INtime SDK Help
INtime SDK v7.1 > About INtime > Other system libraries > Heaps and memory pools > Using the Debug Heap > Types of Blocks on the Debug Heap > _CrtDoForAllClientObjects

Calls an application-supplied function for all _CLIENT_BLOCK types in the heap (debug version only).

void _CrtDoForAllClientObjects (
    void (*_PFn)(
        void *, 
        void *
    void * _Context


Pointer to the application-supplied callback function. The first parameter to this function points to the data.
Pointer to the application-supplied context to pass to the application-supplied function.


_CrtDoForAllClientObjects searches the heap's linked list for memory blocks with the _CLIENT_BLOCK type and, upon finding a block of this type, calls the application-supplied function. The found block and the _Context parameter are passed as arguments to the application-supplied function. During debugging, an application can track a specific group of allocations by explicitly calling the debug heap functions to allocate the memory and assigning the blocks the _CLIENT_BLOCK block type. These blocks can then be tracked separately and reported on differently during leak detection and memory state reporting.

If the _CRTDBG_ALLOC_MEM_DF bit field of the _crtDbgFlag flag is not turned on, _CrtDoForAllClientObjects immediately returns. When _DEBUG is not defined, preprocessing removes calls to _CrtDoForAllClientObjects.

For more information about the _CLIENT_BLOCK type and how other debug functions can use it, see Types of Blocks on the Debug Heap. 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



Versions Defined in Include Link to

INtime 3.13

intime/rt/include/crtdbg.h crtdbg.h


See Also