Description
Reports the colors (green, yellow, and red) Purify detects for a region of memory. Also displays the call stack.
Syntax
int PurifyWhatColors(void *addr, int size)
addr |
The address of the memory region. |
size |
The number of bytes that you want to check in the memory region. You can check a maximum of 2048 (0x800) bytes. |
Returns
0 |
|
Notes
§ Purify reports a WhatColors message in the Error View. The message identifies the color of the memory, as follows:
G (green) |
Memory that has been allocated and initialized. |
Y (yellow) |
Memory that has been allocated, but not yet initialized. Memory returned by malloc is yellow. |
R (red) |
Memory that is unallocated and uninitialized. The memory has either never been allocated or it has been allocated and subsequently freed. |
For an example of the message Purify generates, click WhatColors message.
§ You can call PurifyWhatColors interactively from the Purify View menu while your program is running. Under these circumstances, the call stack has no meaning, and so is not reported in the Purify Error View.
§ This function is most useful when called from the Purify View menu or from within the debugger to dynamically examine the state of a block of memory.
(C) Copyright IBM Corporation 1992, 2010.