[fpc-pascal] Best practice for getting heap usage summary

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Jan 19 10:25:23 CET 2012


On Thu, 19 Jan 2012 09:06:46 +0000
Mark Morgan Lloyd <markMLl.fpc-pascal at telemetry.co.uk> wrote:

> What is considered "best practice" for getting a summary of heap usage, 
> in a single-threaded program which doesn't need to be Delphi-compatible?
> 
> In Delphi programs that have had to run for an extended period I've used 
>   AllocMemCOunt() and AllocMemSize(). What's the best way of getting 
> something comparable for FPC- THeapStatus.TotalAllocated etc.?

Maybe you mean GetFPCHeapStatus

http://lazarus-ccr.sourceforge.net/docs/rtl/system/getfpcheapstatus.html

There is also the Delphi compatible GetHeapStatus, but only for 32bit.

Mattias
 



More information about the fpc-pascal mailing list