The information in this article applies to:
SUMMARYIn the Run-Time Library reference, the section on Using the Debug Heap from Visual C++ incorrectly describes how to place an allocation made with the new operator into a _CLIENT_BLOCK. To access this section from Books Online, follow this hierarchy:
MORE INFORMATIONIn a debug build of an application, you can use a special operator (new) to record the file name, the line number where the allocation occurred, and the block type of the allocation. The documentation states that if you want your allocations to be of type_CLIENT_BLOCK instead of _NORMAL_BLOCK you should include code like the following in an include file:
__FILE__ and __LINE__ are macros defined by the compiler that report the
current file name and line number. Macros are filled out by the
preprocessor; then the compiler replaces your call to new with this
function. Therefore, the macros have already been filled out before they
are inlined. Hence, they will report the header file information not the
actual source location.
There are two ways to mark the correct file name and line number:
-or- Sample Code
Additional query words:
Keywords : kbcode kbdocerr kbCRT kbVC400 kbVC410 kbVC420 kbVC500 kbVC600 |
Last Reviewed: July 1, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |