[fpc-pascal] Heap, Stack, HeapTrc and threads

Marco van de Voort marcov at stack.nl
Fri Nov 25 08:43:50 CET 2011


In our previous episode, Jonas Maebe said:
> I've never seen any reports of heaptrc failing to report memory leaks.  
> Most likely, your problems stem from internal heap fragmentation  
> rather than from memory leaks. Such problems can usually be solved by  
> using the "cmem" unit, which falls back to the default C library's  
> memory manager (FPC's heap manager is generally faster, except in  
> cases of lots of fragmentation).

IMHO if you get into trouble with this, you are already walking on the edge
of the abyss. Using cmem (or any other advanced memory manager) might give
short time relieve because it probably has a different allocation pattern.

But long term it is smarter to simply tackle the causes of fragmentation.



More information about the fpc-pascal mailing list