The unit that does this is called heaptrc. If you want to use it, you should include it as the rst unit in you uses clause. Alternatively, you can supply the -gh switch to the compiler, and it will include the unit automatically for you.
After the program exits, you will get a report looking like this:
Marked memory at 0040FA50 invalid
Wrong size : 128 allocated 64 freed 0x00408708 0x0040CB49 0x0040C481 Call trace for block 0x0040FA50 size 128 0x0040CB3D 0x0040C481 |
The output of the heaptrc unit is customizable by setting some variables. Output can also be customized using environment variables.
You can nd more information about the usage of the heaptrc unit in the Unit reference.