[Lazarus] Heap usage

Micha Nelissen micha at neli.hopto.org
Sat Jul 17 10:52:16 CEST 2010


Mark Morgan Lloyd wrote:
> Is there a simple function or variable which shows the amount of space 
> currently allocated on the heap? I can't find the Lazarus/FPC equivalent 
> of Delphi's AllocMemSize, and I'm looking for a simple metric I can 
> place in a hint to warn of creeping leaks.

Look for GetHeapStatus, it's even compatible with Delphi (if that's 
necessary).

Hint: compile application with -gh, that will use heap tracer and tell 
you at end of application where your leaked blocks are coming from.

Micha




More information about the Lazarus mailing list