INtime SDK Help
_CrtSetBreakAlloc
INtime SDK v7 > About INtime > Other system libraries > Heaps and memory pools > Using the Debug Heap > Tracking Heap Allocation Requests > _CrtSetBreakAlloc

Sets a breakpoint on a specified object allocation order number (debug version only).

long _CrtSetBreakAlloc (
    long lNewBreakAlloc
);

Parameters

lNewBreakAlloc
Allocation order number, for which to set the breakpoint.

Remarks

_CrtSetBreakAlloc lets an application perform memory leak detection by breaking at a specific memory allocation point and tracing back to the request's origin. The function uses the sequential object allocation order number assigned to the memory block when it was allocated in the heap. When _DEBUG is not defined, preprocessing removes calls to _CrtSetBreakAlloc.

The object allocation order number is stored in the lRequest field of the _CrtMemState structure, defined in crtdbg.h. When a debug dump function reports information about a memory block, braces enclose this number, for example: {36}.

For more information about how _CrtSetBreakAlloc can be used with other memory management functions, see Tracking Heap Allocation Requests.

Return Values

The previous object allocation order number that had a breakpoint set.

Requirements

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