SlabAllocatorDeinit
Description
Release every chunk currently owned by self through the embedded PageAllocator, then zero the struct so any post-deinit dispatch trips ValidateAllocator on the cleared __magic. The intrusive free list dies with the chunks.
Parameters
| Name | Direction | Description |
|---|---|---|
self |
in,out | SlabAllocator instance, or NULL. |
Success
Function returns. Every slot previously handed out by this slab is invalid; the struct is fully zeroed and cannot be used until re-initialised.
Failure
No action when self is NULL.
Usage example (Cross-references)
Usage examples (Cross-references)
}
SlabAllocatorDeinit(&slab);
return ok;
}
AllocatorFree(alloc_base, b);
SlabAllocatorDeinit(&slab);
return ok;
} }
SlabAllocatorDeinit(&slab);
return ok;
} bool ok = (big == NULL);
SlabAllocatorDeinit(&slab);
return ok;
} }
SlabAllocatorDeinit(&slab);
return ok;
} AllocatorFree(alloc_base, p);
}
SlabAllocatorDeinit(&slab);
return ok;
}- In
Slab.c:270:
}
void SlabAllocatorDeinit(SlabAllocator *self) {
if (!self)
return;
Last updated on