Debugging Memory Problems with MemoryScape : Chapter 2 Memory Tasks : Task 3: ­Setting MemoryScape Options : Advanced Options : Paint memory
Paint memory
When your program reads a data value, you are assuming that the program has already set the memory to some value. If your program hasn’t seen a value or if it tries to read data from the block after you’ve deallocated it, an error has occurred. MemoryScape can help you detect these problems by setting the value of allocated or deallocated blocks to a value. When your program reads these painted values, it may be able to detect that there is a problem. In some cases, your program may even stop executing.
Enable painting either by selecting a level of Extreme in the Basic Options, or selecting the check box in the Advanced screen. Figure 50 shows painting controls
 
Figure 50: Paint memory Option
These controls let you separately enable allocations and deallocations (you might want to use one and not the other if memory is tight) and set the pattern that MemoryScape writes. Notice that the default patterns resemble the words “allocate” and “deallocate.
For information on painting, see Task 16: “Painting Memory.