Obtains the current state of the debug heap and stores in an application-supplied
_CrtMemState structure (debug version only).
void _CrtMemCheckpoint( _CrtMemState *state );
_CrtMemState structure to fill with the memory checkpoint.
_CrtMemCheckpoint function creates a snapshot of the current state of the debug heap at any given moment. This snapshot can be used by other heap state functions such as
_CrtMemDifference to help detect memory leaks and other problems. When
_DEBUG isn't defined, calls to
_CrtMemState are removed during preprocessing.
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 describing the problem.
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.
NULL, the invalid parameter handler is invoked, as described in Parameter validation. If execution is allowed to continue,
_sys_nerr is set to
EINVAL and the function returns.
For more compatibility information, see Compatibility.
Libraries: Debug versions of the UCRT only.
Submit and view feedback for