pub struct SlabAllocator { /* private fields */ }Expand description
Slab allocator for efficient small allocations (x86_64 only, uses LockedHeap)
Implementations§
Source§impl SlabAllocator
impl SlabAllocator
Sourcepub unsafe fn init(&self, heap_start: usize, heap_size: usize)
pub unsafe fn init(&self, heap_start: usize, heap_size: usize)
Initialize the slab allocator with heap memory
§Safety
The caller must ensure that:
- The heap_start address is valid and properly aligned
- The heap_size bytes starting at heap_start are available for use
- This function is called only once