Redigera

Dela via


_CrtMemDumpAllObjectsSince

Dumps information about objects in the heap from the start of program execution or from a specified heap state (debug version only).

Syntax

void _CrtMemDumpAllObjectsSince(
   const _CrtMemState *state
);

Parameters

state
Pointer to the heap state to begin dumping from or NULL.

Remarks

The _CrtMemDumpAllObjectsSince function dumps the debug header information of objects allocated in the heap in a user-readable form. The dump information can be used by the application to track allocations and detect memory problems. When _DEBUG isn't defined, calls to _CrtMemDumpAllObjectsSince are removed during preprocessing.

_CrtMemDumpAllObjectsSince uses the value of the state parameter to determine where to initiate the dump operation. To begin dumping from a specified heap state, the state parameter must be a pointer to a _CrtMemState structure that has been filled in by _CrtMemCheckpoint before _CrtMemDumpAllObjectsSince was called. When state is NULL, the function begins the dump from the start of program execution.

If the application has installed a dump hook function by calling _CrtSetDumpClient, then every time _CrtMemDumpAllObjectsSince dumps information about a _CLIENT_BLOCK type of block, it calls the application-supplied dump function as well. By default, internal C run-time blocks (_CRT_BLOCK) aren't included in memory dump operations. The _CrtSetDbgFlag function can be used to turn on the _CRTDBG_CHECK_CRT_DF bit of _crtDbgFlag to include these blocks. In addition, blocks marked as freed or ignored (_FREE_BLOCK, _IGNORE_BLOCK) aren't included in the memory dump.

For more information about heap state functions and the _CrtMemState structure, see Heap state reporting functions. For more information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see CRT debug heap details.

Requirements

Routine Required header
_CrtMemDumpAll-ObjectsSince <crtdbg.h>

For more compatibility information, see Compatibility.

Libraries

Debug versions of C run-time libraries only.

Example

For a sample of how to use _CrtMemDumpAllObjectsSince, see crt_dbg2.

See also

Debug routines
_crtDbgFlag