Skip to content
AllocatorEnsureState

AllocatorEnsureState

Description

Ensure that an allocator has initialized runtime state. If the allocator has no state_init callback or already has a state object, this succeeds immediately.

Parameters

Name Direction Description
alloc in,out Allocator to prepare for allocation

Success

Returns true when allocator state is ready.

Failure

Returns false when state initialization fails or alloc is NULL.

Usage example (Cross-references)

Usage examples (Cross-references)
    }
    
    bool AllocatorEnsureState(Allocator *alloc) {
        if (!alloc) {
            return false;
        }
    
        if (!AllocatorEnsureState(alloc)) {
            return NULL;
        }
        }
    
        if (!AllocatorEnsureState(alloc)) {
            return NULL;
        }
Last updated on