Skip to content
DebugAllocatorDeinit

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. Enforces the thread-affinity check – calling from a thread other than the one that ran DebugAllocatorInit aborts via LOG_FATAL.

Parameters

Name Direction Description
self in,out DebugAllocator instance, or NULL / uninitialised.

Success

Function returns. Any still-live allocations have been logged with their captured traces; heap / meta are deinitialised; the struct is fully zeroed and cannot be used until re-initialised. force_page_backing’d regions remain mprotected and stay mapped until process exit (documented trade-off).

Failure

No action when self is NULL or __magic does not match DEBUG_ALLOCATOR_MAGIC. Cross-thread call aborts via LOG_FATAL.

Usage example (Cross-references)

Usage examples (Cross-references)
    ///
    #if FEATURE_DEFAULT_ALLOC_DEBUG
    #    define DefaultAllocatorDeinit(ptr) DebugAllocatorDeinit(ptr)
    #else
    #    define DefaultAllocatorDeinit(ptr) HeapAllocatorDeinit(ptr)
    // ---------------------------------------------------------------------------
    
    void DebugAllocatorDeinit(DebugAllocator *self) {
        if (!self || !MAGIC_MATCHES(self->base.__magic, DEBUG_ALLOCATOR_MAGIC))
            return;
        // No heap write may have overrun any allocation (canary intact).
        ok = ok && DebugAllocatorOverflows(&dbg) == 0;
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
            PdbDeinit(&pdb);
        ok = ok && DebugAllocatorOverflows(&dbg) == 0;
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && DebugAllocatorLiveCount(&alloc) == baseline;
    
        DebugAllocatorDeinit(&alloc);
        return ok;
    }
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        bool ok = (DebugAllocatorLiveCount(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        SymbolResolver res;
        if (!SymbolResolverInit(&res, ALLOCATOR_OF(&alloc))) {
            DebugAllocatorDeinit(&alloc);
            return false;
        }
    
        SymbolResolverDeinit(&res);
        DebugAllocatorDeinit(&alloc);
        return ok;
    }
        SymbolResolver res;
        if (!SymbolResolverInit(&res, ALLOCATOR_OF(&alloc))) {
            DebugAllocatorDeinit(&alloc);
            return false;
        }
    
        SymbolResolverDeinit(&res);
        DebugAllocatorDeinit(&alloc);
        return ok;
    }
        SymbolResolver res;
        if (!SymbolResolverInit(&res, ALLOCATOR_OF(&alloc))) {
            DebugAllocatorDeinit(&alloc);
            return false;
        }
    
        SymbolResolverDeinit(&res);
        DebugAllocatorDeinit(&alloc);
        return ok;
    }
        SymbolResolver res;
        if (!SymbolResolverInit(&res, ALLOCATOR_OF(&alloc))) {
            DebugAllocatorDeinit(&alloc);
            return false;
        }
    
        SymbolResolverDeinit(&res);
        DebugAllocatorDeinit(&alloc);
        return ok;
    }
        SymbolResolver res;
        if (!SymbolResolverInit(&res, ALLOCATOR_OF(&alloc))) {
            DebugAllocatorDeinit(&alloc);
            return false;
        }
        ok = ok && DebugAllocatorLiveCount(&alloc) == baseline;
    
        DebugAllocatorDeinit(&alloc);
        return ok;
    }
        bool ok   = grew && back && r.allocator == NULL;
    
        DebugAllocatorDeinit(&alloc);
        return ok;
    }
    
        bool ok = LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
    
        bool ok = LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
    
        bool ok = LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&b);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        StrDeinit(&out);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        StrDeinit(&out);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&v);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&b);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&b);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&b);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&b);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&b);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&a);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&a);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&a);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&a);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        bool ok = LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        if (!pushed) {
            ProcMapsDeinit(&pm);
            DebugAllocatorDeinit(&alloc);
            return false;
        }
    
        ProcMapsDeinit(&pm);
        DebugAllocatorDeinit(&alloc);
        return ok;
    }
    
        GraphDeinit(&graph);
        DebugAllocatorDeinit(&dbg);
        return result;
    }
    
        GraphDeinit(&graph);
        DebugAllocatorDeinit(&dbg);
        return result;
    }
        ok = ok && (DebugAllocatorLiveBytes(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (DebugAllocatorLiveBytes(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (DebugAllocatorLiveBytes(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        StrDeinit(out);
        bool ok = (DebugAllocatorLiveCount(dbg) == 0);
        DebugAllocatorDeinit(dbg);
        return ok;
    }
            AllocatorFree(&dbg.base, s);
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        BitVecDeinit(&bv);
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        BitVecDeinit(&bv);
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        BitVecDeinit(&bv);
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&v);
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&f);
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&f);
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && DebugAllocatorOverflows(&dbg) == 0;
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        bool  ok = (p == NULL) && (DebugAllocatorLiveCount(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
            AllocatorFree(adbg, p);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
    
        bool ok = DebugAllocatorOverflows(&dbg) == 1;
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok      = ok && DebugAllocatorLiveBytes(&dbg) == (32 + 48);
    
        DebugAllocatorDeinit(&dbg); // logs the leaks
        return ok;
    }
        if (p2)
            AllocatorFree(adbg, p2);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        if (p)
            AllocatorFree(adbg, p);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (VecPtrAt(&dbg.freed, 2)->ptr == p3) && (VecPtrAt(&dbg.freed, 2)->requested_size == 64);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        if (grown)
            AllocatorFree(adbg, grown);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok        = ok && (nil == NULL) && (DebugAllocatorLiveCount(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
            AllocatorFree(adbg, p);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
    
        ok = ok && (DebugAllocatorOverflows(&dbg) == 1);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (VecPtrAt(&dbg.freed, 0)->alloc_trace_n == live_n);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && match;
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (VecPtrAt(&dbg.freed, 0)->free_trace_n == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (VecPtrAt(&dbg.freed, 0)->free_trace_n == 2);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (VecPtrAt(&dbg.freed, 0)->free_trace_n <= DEBUG_ALLOCATOR_MAX_TRACE);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
    
        ok = ok && (AllocatorDeallocations(adbg) == 1);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (AllocatorBytesInUse(adbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (DebugAllocatorOverflows(&dbg) == 0);
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
            AllocatorFree(adbg, p);
        ok = ok && (DebugAllocatorLiveBytes(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        if (p2)
            AllocatorFree(adbg, p2);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        // still 100 after frees (cumulative)
        ok = ok && (AllocatorBytesRequested(adbg) == 100);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
            AllocatorFree(adbg, p);
        ok = ok && (AllocatorBytesInUse(adbg) == 0);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        // peak does not shrink on free
        ok = ok && (AllocatorPeakBytesInUse(adbg) == 512);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        if (p)
            AllocatorFree(adbg, p);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        if (small)
            AllocatorFree(adbg, small);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (DebugAllocatorLiveBytes(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        if (p)
            AllocatorFree(adbg, p);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        if (p)
            AllocatorFree(adbg, p);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        if (p)
            AllocatorFree(adbg, p);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
    
        ok = ok && (DebugAllocatorOverflows(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        AllocatorFree(adbg, buf);
        ok = ok && (DebugAllocatorOverflows(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (DebugAllocatorLiveBytes(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        if (p)
            AllocatorFree(adbg, p);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        // The canary sits exactly at offset n; a one-past write corrupts it.
        ok = ok && (DebugAllocatorOverflows(&dbg) == 1);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        if (grown)
            AllocatorFree(adbg, grown);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (DebugAllocatorOverflows(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        if (p)
            AllocatorFree(adbg, p);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
            AllocatorFree(adbg, q);
        dbg.bytes_in_use = 0;
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
            AllocatorFree(adbg, p);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        if (p)
            AllocatorFree(adbg, p);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        }
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        Buf in = BufInit(base);
        if (!BufReserve(&in, sizeof(sblob))) {
            DebugAllocatorDeinit(&dbg);
            return false;
        }
        ok = ok && DebugAllocatorLiveCount(&dbg) == 0;
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        bool ok = PdbOpenFromMemoryCopy(&pdb, xblob, sizeof(xblob), base);
        if (!ok) {
            DebugAllocatorDeinit(&dbg);
            return false;
        }
        ok = ok && DebugAllocatorLiveCount(&dbg) == 0;
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
    
        StrDeinit(&s);
        DebugAllocatorDeinit(&dbg);
        return pass;
    }
        }
    
        DebugAllocatorDeinit(&dbg);
        return result;
    }
    
        bool match = (ok == false) && (DebugAllocatorLiveCount(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        return match;
    }
    
        bool match = (ok == false) && (DebugAllocatorLiveCount(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        return match;
    }
    
        bool match = (ok == false);
        DebugAllocatorDeinit(&dbg);
        return match;
    }
    
        DnsResponseDeinit(&resp);
        DebugAllocatorDeinit(&dbg);
        return match;
    }
    
        bool ok = LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r3);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&m2);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&v);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&rem);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&rem);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&nsq);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&npw);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&n2);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&composite);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&n);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r1);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&v);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&out);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        IntDeinit(&r);
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
    
        ok = ok && LEAK_CLEAN(dbg);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FileRemove((Zstr)pdb_side);
        (void)fx;
        DebugAllocatorDeinit(&dbg);
        return result;
    }
    
        FileRemove((Zstr)pe_path);
        DebugAllocatorDeinit(&dbg);
        return result;
    }
        FileRemove(pe_name);
        FileRemove(pdb_name);
        DebugAllocatorDeinit(&dbg);
        return result;
    }
    
        FileRemove((Zstr)pe_path);
        DebugAllocatorDeinit(&dbg);
        return result;
    }
        FileRemove((Zstr)pe_path);
        FileRemove((Zstr)pdb_side);
        DebugAllocatorDeinit(&dbg);
        return result;
    }
    
        fixture_remove(&fx);
        DebugAllocatorDeinit(&dbg);
        return result;
    }
        fixture_remove(&fa);
        fixture_remove(&fb);
        DebugAllocatorDeinit(&dbg);
        return result;
    }
    
        fixture_remove(&fx);
        DebugAllocatorDeinit(&dbg);
        return result;
    }
    
        fixture_remove(&fx);
        DebugAllocatorDeinit(&dbg);
        return result;
    }
        FileRemove((Zstr)pe_path);
        FileRemove((Zstr)pdb_path);
        DebugAllocatorDeinit(&dbg);
        return result;
    }
        FileRemove((Zstr)pe_path);
        FileRemove((Zstr)pdb_path);
        DebugAllocatorDeinit(&dbg);
        return result;
    }
    
        fixture_remove(&fx);
        DebugAllocatorDeinit(&dbg);
        return result;
    }
        ok = ok && (AllocatorBytesInUse(adbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        if (p)
            AllocatorFree(adbg, p);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        if (p)
            AllocatorFree(adbg, p);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ProcMaps maps;
        if (!proc_maps_load(&maps, base)) {
            DebugAllocatorDeinit(&dbg);
            return false;
        }
        ok         = ok && after == before;
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        result = result && (DebugAllocatorLiveCount(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return result;
    }
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
    
        DefaultAllocatorDeinit(&palloc);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FileRemove(dsym_path);
        DirRemoveAll("/tmp/misra_bl_dwarf3.dSYM");
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
    
        FileRemove(bin_path);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FileRemove(bin_a);
        FileRemove(bin_b);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FileRemove(dsym_path);
        DirRemoveAll("/tmp/misra_mc_dsym.dSYM");
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FileRemove(dsym_path);
        DirRemoveAll("/tmp/misra_mc_uuidmiss.dSYM");
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FileRemove(dsym_path);
        DirRemoveAll("/tmp/misra_mc_dwarf.dSYM");
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
    
        ok = ok && DebugAllocatorLiveCount(&dbg) == 0;
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
    
        ok = ok && DebugAllocatorLiveCount(&dbg) == 0;
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
    
        ok = ok && DebugAllocatorLiveCount(&dbg) == 0;
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
    
        ok = ok && DebugAllocatorLiveCount(&dbg) == 0;
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
    
        ok = ok && DebugAllocatorLiveCount(&dbg) == 0;
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
    
        ok = ok && DebugAllocatorLiveCount(&dbg) == 0;
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
    
        ok = ok && DebugAllocatorLiveCount(&dbg) == 0;
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        bool back = DebugAllocatorLiveCount(&alloc) == baseline;
    
        DebugAllocatorDeinit(&alloc);
        return parsed && back;
    }
        bool back = DebugAllocatorLiveCount(&alloc) == baseline;
    
        DebugAllocatorDeinit(&alloc);
        return parsed && back;
    }
        Pe pe;
        if (!PeOpenFromMemoryCopy(&pe, blob, sizeof(blob), base)) {
            DebugAllocatorDeinit(&alloc);
            return false;
        }
    
        PeDeinit(&pe);
        DebugAllocatorDeinit(&alloc);
        return ok;
    }
        FloatDeinit(&v);
        HeapAllocatorDeinit(&fa);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&v);
        HeapAllocatorDeinit(&fa);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&v);
        HeapAllocatorDeinit(&fa);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&v);
        HeapAllocatorDeinit(&fa);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (DebugAllocatorLiveBytes(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (DebugAllocatorLiveBytes(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (DebugAllocatorLiveBytes(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (DebugAllocatorLiveBytes(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        StrDeinit(&out);                                                                                                   \
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0) && (DebugAllocatorLiveBytes(&dbg) == 0);                           \
        DebugAllocatorDeinit(&dbg);                                                                                        \
        return ok
        StrDeinit(&out);
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0) && (DebugAllocatorLiveBytes(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        StrDeinit(&s);
        HeapAllocatorDeinit(&va);
        StrDeinit(&out);
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0) && (DebugAllocatorLiveBytes(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        IntDeinit(&v);
        HeapAllocatorDeinit(&va);
        StrDeinit(&out);
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0) && (DebugAllocatorLiveBytes(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        FloatDeinit(&v);
        HeapAllocatorDeinit(&va);
        StrDeinit(&out);
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0) && (DebugAllocatorLiveBytes(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        BitVecDeinit(&v);
        HeapAllocatorDeinit(&va);
        StrDeinit(&out);
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0) && (DebugAllocatorLiveBytes(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        StrDeinit(&s);
        HeapAllocatorDeinit(&sa);
        StrDeinit(&out);
        ok = ok && (DebugAllocatorLiveCount(&dbg) == 0) && (DebugAllocatorLiveBytes(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        FloatDeinit(&f);
        HeapAllocatorDeinit(&fa);
        StrReadFmt(p, fmt, s); // reader frees s on the unterminated/error branch
        bool ok = (DebugAllocatorLiveCount(&dbg) == 0) && (DebugAllocatorLiveBytes(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        StrReadFmt(p, "{}", s);
        bool ok = (DebugAllocatorLiveCount(&dbg) == 0) && (DebugAllocatorLiveBytes(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        BitVecDeinit(&bv);
        bool ok = (DebugAllocatorLiveCount(&dbg) == 0) && (DebugAllocatorLiveBytes(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        FloatDeinit(&fv);
        bool ok = (DebugAllocatorLiveCount(&dbg) == 0) && (DebugAllocatorLiveBytes(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        bool ok = (rc == ARG_RUN_HELP) && (DebugAllocatorLiveCount(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
    
        bool ok = !built && (DebugAllocatorLiveCount(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
    
        bool ok = !built && (DebugAllocatorLiveCount(&dbg) == 0);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        bool ok = !opened && DebugAllocatorLiveCount(&dbg) == 0;
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        Elf elf;
        if (!ElfOpenFromMemoryCopy(&elf, elfbuf, (size)elf_len, base)) {
            DebugAllocatorDeinit(&dbg);
            return false;
        }
    
        ElfDeinit(&elf);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        Elf elf;
        if (!ElfOpenFromMemoryCopy(&elf, elfbuf, (size)elf_len, base)) {
            DebugAllocatorDeinit(&dbg);
            return false;
        }
    
        ElfDeinit(&elf);
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
    
        ok = DebugAllocatorLiveCount(&dbg) == 0;
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (DebugAllocatorLiveBytes(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (DebugAllocatorLiveBytes(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (DebugAllocatorLiveBytes(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
        ok = ok && (DebugAllocatorLiveBytes(&dbg) == 0);
    
        DebugAllocatorDeinit(&dbg);
        return ok;
    }
Last updated on