MemoryScape automatically displays the Memory Debugging Options screen after you add a program. You can also display it by selecting
Memory Debugging Options on the primary navigation bar,
Figure 40.
MemoryScape records all memory requests. These include calls to
malloc(),
realloc(), and other calls to your malloc library. It also includes calls to C++ operators such as
new and
delete that indirectly use this library. It can even include memory management functions performed by some Fortran libraries.
When you ask for a report, MemoryScape analyzes this recorded information and displays the information you request.
In addition to performing all operations indicated by Low, MemoryScape also writes guard blocks before and after allocated memory blocks. For more information on guard blocks and locating corrupted memory, see
Task 11: “Viewing Corrupted Memory”.
Because MemoryScape is writing additional information, the size of the allocated memory block is slightly larger. Although this action alters your program’s memory usage, the extra overhead is very small.
Select Medium only when you need to check for corrupted memory.
In addition to performing all operations indicated by the
Low level, MemoryScape will also write a Red Zone after the allocated memory block and notify you if you access memory in this Red Zone. This is called an overrun.
Because MemoryScape is allocating additional memory for the Red Zone, your program’s memory usage is affected, and the extra overhead can be significant.
Select High only if you need to check for memory overruns. As an alternative, you can select Low and use the Red Zones button on the task bar to turn on Red Zones as needed for suspect allocations.
In addition to performing all operations indicated by the
Low,
Medium, and High levels, MemoryScape will paint allocated and deallocated memory as well as hoard memory.
Select Extreme only if you need hoarding and painting.