Find Memory Allocation (Heap) Problems
To find memory allocation problems (problems relating to the heap), you will need to
perform one or more subtasks from the list below:
- Build your program with heap checking enabled. This checks for memory problems at
statements like new, delete, malloc and free.
- Use the heap checking commands while stepping though your code to locate the memory
error.
- Use the Storage View to view memory contents.
- Locate a point near where the heap is corrupted using the heap corruption messages. Set
a breakpoint at this point, start a new debug session, run to the breakpoint you just set,
then step through your code checking the heap after each step.
- Locate the corrupted memory address using the heap corruption messages. Set a watchpoint
at this location after memory is allocated and start a new debug session to monitor this
location.

Set Incorporation Options for Heap Debugging

Set a Watchpoint
Check Heap for Corruption After Each Step Command