pub struct BumpAllocator<P: MemoryPool> { /* private fields */ }Expand description
Bump allocator for sequential allocations
Simple and fast allocator that only supports allocation, not deallocation of individual items. Perfect for temporary buffers and stack-like usage.
Implementations§
Trait Implementations§
Source§impl<P: MemoryPool + Sync> GlobalAlloc for BumpAllocator<P>
Available on crate feature alloc only.
impl<P: MemoryPool + Sync> GlobalAlloc for BumpAllocator<P>
Available on crate feature
alloc only.Source§unsafe fn alloc(&self, layout: Layout) -> *mut u8
unsafe fn alloc(&self, layout: Layout) -> *mut u8
Allocates memory as described by the given
layout. Read moreAuto Trait Implementations§
impl<P> Freeze for BumpAllocator<P>where
P: Freeze,
impl<P> RefUnwindSafe for BumpAllocator<P>where
P: RefUnwindSafe,
impl<P> Send for BumpAllocator<P>where
P: Send,
impl<P> Sync for BumpAllocator<P>where
P: Sync,
impl<P> Unpin for BumpAllocator<P>where
P: Unpin,
impl<P> UnsafeUnpin for BumpAllocator<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for BumpAllocator<P>where
P: UnwindSafe,
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