控制标志Control Flags

Microsoft C 运行库的调试版本使用下列标志控制堆分配和报告过程。The debug version of the Microsoft C run-time library uses the following flags to control the heap allocation and reporting process. 有关详细信息,请参阅 CRT 调试方法For more information, see CRT Debugging Techniques.

FlagFlag 说明Description
_CRTDBG_MAP_ALLOC_CRTDBG_MAP_ALLOC 将基堆函数映射到其对应的调试版本Maps the base heap functions to their debug version counterparts
_DEBUG_DEBUG 支持使用运行时函数的调试版本Enables the use of the debugging versions of the run-time functions
_crtDbgFlag_crtDbgFlag 控制调试堆管理器如何跟踪分配Controls how the debug heap manager tracks allocations

这些标志可以使用 /D 命令行选项或 #define 指令定义。These flags can be defined with a /D command-line option or with a #define directive. 如果标志是使用 #define 定义的,则指令必须在标头文件包含例程声明的语句之前显示。When the flag is defined with #define, the directive must appear before the header file include statement for the routine declarations.

另请参阅See Also

全局变量和标准类型Global Variables and Standard Types