alloc Miscellaneous Option

Syntax: Default:
alloc(debug[, yes])
alloc(debug, no)
alloc(debug, no)

This option controls whether the debug versions of memory management functions, including heap management functions, are used to build the target. When this option is set to yes, the debug versions of the memory management functions replace the regular memory management functions. For example, _debug_malloc is used when the source calls malloc, _debug_heapmin replaces _heapmin, and so on.

For C++ code, this option links debug versions of new and delete.

When this option is set to yes, code is inserted at the beginning of every function to initialize the bytes of all local variables with the value 0xAA. This makes it easier to find uninitialized local variables, and is equivalent to building with gen(initAuto, 170).

The debug functions record the line number and file name of each call from your source to a memory management function. You can use this information as an aid for debugging. Setting this option to yes also defines the macro __DEBUG_ALLOC__.

By default VisualAge C++ uses the regular memory management functions. The regular allocation functions do not initialize the storage.



Incremental C++ Builds
C Compilation


Set Build Options
Build


Miscellaneous Options
Debug Memory Management Functions