-qheapdebug

Category

Error checking and debugging

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 (usr/vacpp/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.

Syntax

Read syntax diagramSkip visual syntax diagram
        .-noheapdebug-.   
>>- -q--+-heapdebug---+----------------------------------------><

Defaults

-qnoheapdebug

Usage

For complete information on the debug memory management functions, see Memory debug library functions.

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:

xlc -qheapdebug myprogram.c -o testing 

Related information