pub struct MemFixedAllocator { /* private fields */ }Expand description
A two-phase bump allocator for fixed-size, aligned sub-regions.
§Usage
- Pre-allocation phase — call
pre_alloc_datarepeatedly to accumulate the total size needed. - Call
alloc_dataonce to allocate the backing buffer. - Allocation phase — call
alloc_datato hand out sub-slices from the backing buffer.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MemFixedAllocator
impl RefUnwindSafe for MemFixedAllocator
impl Send for MemFixedAllocator
impl Sync for MemFixedAllocator
impl Unpin for MemFixedAllocator
impl UnsafeUnpin for MemFixedAllocator
impl UnwindSafe for MemFixedAllocator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more