heaptrc

From Lazarus wiki
Revision as of 19:11, 21 April 2014 by Jwdietrich (talk | contribs) (Created page with "'''heaptrc''' is a unit that can be used to debug allocation and deallocation of memory blocks. It keeps track of calls to getmem/freemem, and, implicitly, of New/Dispose stat...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

heaptrc is a unit that can be used to debug allocation and deallocation of memory blocks. It keeps track of calls to getmem/freemem, and, implicitly, of New/Dispose statements.

On Lazarus for Windows it displays the total memory used and then dumps a list of blocks that were allocated but not freed, in a dialog box after termination of the program. Additionally it can store its output to file, which is the only mode of operation on Unix systems.

See also

leakview: Examples how to enable heaptrc in Lazarus and Free Pascal.