Michael Van Canneyt schreef:
On Wed, 9 Aug 2006, Vincent Snijders wrote:
Michael Van Canneyt schreef:
In fact, Free Pascal suppprts including Windows resources in the binary
on all ELF platforms (e.g. linux). The fpcres program does exactly that.
{$R somefile.res}
will include the resource file in the binary. This feature is enabled
even
in the fixes branch.
In fact, Lazarus could switch now to using this for including form files.
This would drastically reduce the memory requirements of all Lazarus
applications.
How does using Windows resources reduce memory requirements?
Now you have ALL the forms stored in strings in heap memory (with all
the overhead that implies), as well as in the binary. Thus, they are
in memory twice.
Storing them in the resources would mean they are stored only in the binary.
Thanks for the explanation, Marc, Mattias and Michael.
So the executable size will be the same (maybe slightly (negligible) bigger, because
string constants can be stored without lookup tables in the binary and a resources
might need some lookup tables). But the memory use is smaller, because the constants
don't have to be loaded into memory.
Sounds attractive.
Vincent
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives