INtime SDK Help
_CrtMemCheckpoint
INtime SDK v7 > About INtime > Other system libraries > Heaps and memory pools > Using the Debug Heap > Heap State Reporting Functions > _CrtMemCheckpoint

Obtains the debug heap's current state and stores it in an application-supplied _CrtMemState structure (debug version only).

void _CrtMemCheckpoint (
    _CrtMemState * _State
);

Parameters

_State
Pointer to _CrtMemState structure to fill with the memory checkpoint.

Remarks

_CrtMemCheckpoint creates a snapshot of the debug heap's current state at any given moment, which other heap state functions to help detect memory leaks and other problems. When _DEBUG is not defined, preprocessing removes calls to _CrtMemState.

The application must pass a pointer to a previously allocated instance of the _CrtMemState structure, defined in CRTDBG.H, in the _State parameter. If _CrtMemCheckpoint encounters an error during the checkpoint creation, the function generates a _CRT_WARN debug report that describes the problem.

For more information about heap state functions and the _CrtMemState structure, see Heap State Reporting Functions. For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see Memory Management and the Debug Heap.

Return Values

None.

Requirements

Versions Defined in Include Link to
INtime 3.13 intime/rt/include/crtdbg.h crtdbg.h clib.lib
   
See Also