Skip to content
DEBUG_LIVE_LIT

DEBUG_LIVE_LIT

Description

Compound-literal initializer for the embedded live map (a Map(void *, DebugRecord)). Stamps the hash/compare callbacks (debug_ptr_hash / debug_ptr_compare), the map magic, and the linear-probe policy; leaves .allocator = NULL so the first use inside debug_allocator_allocate / _deallocate can bind it to the surrounding DebugAllocator’s &self->meta.base once the final struct address is known. Used internally by DebugAllocatorInitWith – callers should not reach for it.

Success

Yields a struct-initializer expression suitable as the .live = DEBUG_LIVE_LIT arm of a DebugAllocator compound literal.

Failure

Macro cannot fail at expansion.

Usage example (Cross-references)

Usage examples (Cross-references)
            .page         = PageAllocatorInit(),                                                                           \
            .config       = (_cfg),                                                                                        \
            .live         = DEBUG_LIVE_LIT,                                                                                \
            .freed        = DEBUG_FREED_LIT,                                                                               \
            .overflows    = 0,                                                                                             \
Last updated on