pub struct BumpAlloc { /* private fields */ }
Expand description
Bump allocator for multi-core systems
A bump allocator keeps a single pointer to the start of the unitialized heap. When an allocation happens this pointer is ‘bumped’ sufficiently to fit the allocation. Deallocations have no effect on the pointer, meaning that memory is allocated at program start and never freed. This is very fast.
Implementations
Trait Implementations
sourceimpl GlobalAlloc for BumpAlloc
impl GlobalAlloc for BumpAlloc
sourceunsafe fn alloc(&self, layout: Layout) -> *mut u8
unsafe fn alloc(&self, layout: Layout) -> *mut u8
Allocate memory as described by the given
layout
. Read moreimpl Sync for BumpAlloc
Auto Trait Implementations
impl RefUnwindSafe for BumpAlloc
impl Send for BumpAlloc
impl Unpin for BumpAlloc
impl UnwindSafe for BumpAlloc
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more