> Op Sat, 3 Nov 2007, schreef Marco van de Voort: > > > > Op Sat, 3 Nov 2007, schreef Michael Van Canneyt: > > > Even then, there will only be savings if the amount of code that can be > > > smartlinked is small. > > > > > > Example: Let's say an LCL package is 10MB. 2 applications are 2MB when > > > smartlinked, and 100kb when linked against the package. (The heap can be > > > ignored in this discussion because its memory usage does not differ > > > depending on packages being used.) > > > > > > Memory use with packages: 10MB+2*100KB = 10,2MB. > > > Memory use with smartlinking: 2*2MB = 4MB > > > > _ADDRESS_ space use. Memory use depends on actual usage, since the pages of > > memory mapped DLLs will only be loaded on access. (and afaik linux does it > > similarly) > > True, but does that change this calculation? I.e. if 75% of the code is in > memory, the calculation still results in the same conclusion.
If the percentage is the same yes, but since the packages one has a higher percentage of unused code, the unused pages percentage will also be higher. > Or is there, > according to you, a reason why smartlinked programs have higher loading > percentages than dynamically linked programs? Yes. They contain code that is more or less likely to have a chance to be really used. The "bloat" in the packages scenario doesn't. And such a LCL bpl would be roughly have the TEXT symbols of each component in order, and an bunch of unused components would lead to unused pages. _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel