Control Flags

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Control Flags.

The debug version of the Microsoft C run-time library uses the following flags to control the heap allocation and reporting process. For more information, see CRT Debugging Techniques.

FlagDescription
_CRTDBG_MAP_ALLOCMaps the base heap functions to their debug version counterparts
_DEBUGEnables the use of the debugging versions of the run-time functions
_crtDbgFlagControls how the debug heap manager tracks allocations

These flags can be defined with a /D command-line option or with a #define directive. When the flag is defined with #define, the directive must appear before the header file include statement for the routine declarations.

Global Variables and Standard Types

Show: