DebugAllocatorLiveCount
Description
Number of allocations currently outstanding (alloc minus free).
Usage example (Cross-references)
Usage examples (Cross-references)
- In
AllocDebug.c:23:
bool ok = p1 && p2;
ok = ok && DebugAllocatorLiveCount(dbg) == 2;
ok = ok && DebugAllocatorLiveBytes(dbg) == (64 + 128);- In
AllocDebug.c:27:
AllocatorFree(adbg, p1, 64);
ok = ok && DebugAllocatorLiveCount(dbg) == 1;
ok = ok && DebugAllocatorLiveBytes(dbg) == 128;- In
AllocDebug.c:31:
AllocatorFree(adbg, p2, 128);
ok = ok && DebugAllocatorLiveCount(dbg) == 0;
ok = ok && DebugAllocatorLiveBytes(dbg) == 0;
ok = ok && DebugAllocatorDoubleFrees(dbg) == 0;- In
AllocDebug.c:98:
(void)AllocatorAlloc(adbg, 48, true);
bool ok = DebugAllocatorLiveCount(dbg) == 2;
ok = ok && DebugAllocatorLiveBytes(dbg) == (32 + 48);- In
Debug.c:348:
// ---------------------------------------------------------------------------
size DebugAllocatorLiveCount(const DebugAllocator *self) {
if (!self)
return 0;
Last updated on