[fpc-pascal] Heap manager tuning

Jonas Maebe jonas.maebe at elis.ugent.be
Sat Aug 9 23:36:00 CEST 2014


On 09/08/14 23:01, denisgolovan wrote:
> That allocation takes 10Gb+ under FPC heap manager. Further allocation becomes hardly possible (I have 16Gb on-board).
> Meanwhile, cmem allocates around 3Gb. So I can operate >3 times more object set.
>
> I am pretty sure I don't have any memory leaks (heaptr is enabled all the time).
>
> Any suggestions?

Try avoiding growing memory blocks small amounts at a time via 
reallocmem or setlength, and instead grow them in bigger chuncks. This 
will both increase the performance of your program and reduce the 
internal memory fragmentation.


Jonas



More information about the fpc-pascal mailing list