-qheapdebug
Category
Pragma equivalent
None.
Purpose
Enables debug versions of memory management functions.
The compiler ships a set of "debug" versions of the standard memory management functions defined in stdlib.h (such as _debug_calloc and _debug_malloc); the header files for these functions are found in the product include directory (/opt/IBM/xlc/13.1.2/include). By default, the compiler uses the regular memory management functions (such as calloc and malloc) and does not preinitialize their local storage. When -qheapdebug is in effect, the compiler searches for header files first in the product include directory, where the debug versions of memory management functions are stored, and then in the system include directory.
Defaults
-qnoheapdebug
Usage
Predefined macros
__DEBUG_ALLOC__ is defined to 1 when -qheapdebug is in effect; otherwise, it is undefined.
Examples
To compile myprogram.c with the debug versions of memory management functions, enter the following command:
xlc -qheapdebug myprogram.c -o testing



