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:
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: