[fpc-pascal] Help with understanding HeapTrc output

JoshyFun joshyfun at gmail.com
Mon Nov 3 20:08:43 CET 2008

Hello Graeme,

Monday, November 3, 2008, 3:10:49 PM, you wrote:

GG> 1)  Every "Call trace for block" is a memory leak, correct?

Yes, but take care, two strings in a non freed object (in example)
will produce three memory blocks. 1 for the object and one for each

GG> 2)  Each "Call trace for block" is where the memory was allocated
GG> (start being used)?

Where it has been allocated or reallocated (it could be used somehow
later, or never).

GG> 3)  I should trace the information from the bottom line to the top line...

To follow the sequence yes.

GG> 4) Why does it quote more than one line?  If I allocated memory on a
GG> specific line, should just that line be quoted?

You may allocate a memory block in the same line following different
paths, finally all memory blocks are a "GetMem" so if only one line is
quoted you will only see "GetMem" procedure.

Best regards,

More information about the fpc-pascal mailing list