DebugAllocatorDeinit
Description
Tear down a DebugAllocator. Iterates live first and emits a LOG_ERROR for each still-live allocation with its captured alloc trace. Releases all backing storage (heap / meta / page-managed pages) and clears the struct.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
AllocDebug.c:31:
ok = ok && DebugAllocatorOverflows(&dbg) == 0;
DebugAllocatorDeinit(&dbg);
return ok;
}- In
AllocDebug.c:47:
bool ok = DebugAllocatorDoubleFrees(&dbg) == 1;
DebugAllocatorDeinit(&dbg);
return ok;
}- In
AllocDebug.c:65:
bool ok = DebugAllocatorOverflows(&dbg) == 1;
DebugAllocatorDeinit(&dbg);
return ok;
}- In
AllocDebug.c:84:
// free everything via the internal heap. The leaked records are
// surfaced before the tracking map gets torn down.
DebugAllocatorDeinit(&dbg);
return ok;
}- In
AllocDebug.c:116:
ok = ok && DebugAllocatorDoubleFrees(&dbg) == 1;
DebugAllocatorDeinit(&dbg);
return ok;
}- In
Debug.c:281:
// ---------------------------------------------------------------------------
void DebugAllocatorDeinit(DebugAllocator *self) {
if (!self || self->base.__magic != MISRA_DEBUG_ALLOCATOR_MAGIC)
return;- In
Default.h:72:
# define DefaultAllocatorInit() DebugAllocatorInit()
# endif
# define DefaultAllocatorDeinit(ptr) DebugAllocatorDeinit(ptr)
#else
# define DefaultAllocatorInit() HeapAllocatorInit()
Last updated on