If you type dheap -enable -notify and then run your program, MemoryScape notifies you if a problem occurs when your program tries to free memory.
When execution stops, you can type dheap (with no arguments), to display information about what happened. You can also use the dheap -info and dheap -info -backtrace commands to display additional information. The information displayed by these commands lets you locate the statement in your program that caused the problem. For example:
d1.<> dheap
process: Enable Notify Available
1 (18993): yes yes yes
1.1 realloc: Address does not match any allocated block.:
0xbfffd87c
For each allocated region, the CLI displays the start and end address, and the length of the region in decimal and hexadecimal formats. For example:
d1.<> dheap
process: Enable Notify Available
1 (30420): yes yes yes
1.1 free: Address is not the start of any allocated block.: