pub struct BumpAlloc<const N: usize> { /* private fields */ }Expand description
A fixed-size bump arena of N bytes.
dealloc is a no-op; space is reclaimed only by reset.
Implementations§
Source§impl<const N: usize> BumpAlloc<N>
impl<const N: usize> BumpAlloc<N>
Trait Implementations§
Source§impl<const N: usize> GlobalAlloc for BumpAlloc<N>
impl<const N: usize> GlobalAlloc for BumpAlloc<N>
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 moreimpl<const N: usize> Sync for BumpAlloc<N>
Auto Trait Implementations§
impl<const N: usize> !Freeze for BumpAlloc<N>
impl<const N: usize> !RefUnwindSafe for BumpAlloc<N>
impl<const N: usize> Send for BumpAlloc<N>
impl<const N: usize> Unpin for BumpAlloc<N>
impl<const N: usize> UnsafeUnpin for BumpAlloc<N>
impl<const N: usize> UnwindSafe for BumpAlloc<N>
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