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)
- In
Allocator.c:151:
}
bool AllocatorEnsureState(Allocator *alloc) {
if (!alloc) {
return false;- In
Allocator.c:172:
}
if (!AllocatorEnsureState(alloc)) {
return NULL;
}- In
Allocator.c:196:
}
if (!AllocatorEnsureState(alloc)) {
return NULL;
}
Last updated on