Skip to content
MISRA_DEBUG_ALLOCATOR_MAGIC

MISRA_DEBUG_ALLOCATOR_MAGIC

Description

Per-type magic for DebugAllocator.

Usage example (Cross-references)

Usage examples (Cross-references)
    
    static DebugAllocator *debug_validate_self(const Allocator *self) {
        if (!self || self->__magic != MISRA_DEBUG_ALLOCATOR_MAGIC) {
            LOG_FATAL("type-confusion: allocator passed to debug_allocator_* is not a DebugAllocator");
        }
            .effort      = parent->effort,
            .retry_limit = parent->retry_limit,
            .__magic     = MISRA_DEBUG_ALLOCATOR_MAGIC,
        };
        dbg->parent                = parent;
Last updated on