pub struct TwoGenerationArena { /* private fields */ }Expand description
A two-generation arena (nursery + stable) for generational allocation.
Implementations§
Source§impl TwoGenerationArena
impl TwoGenerationArena
Sourcepub fn alloc_nursery(&mut self, size: usize, align: usize) -> usize
pub fn alloc_nursery(&mut self, size: usize, align: usize) -> usize
Allocates in the nursery generation.
Sourcepub fn promote(&mut self, size: usize, align: usize) -> usize
pub fn promote(&mut self, size: usize, align: usize) -> usize
Promotes an allocation from nursery to stable generation.
Sourcepub fn num_promotions(&self) -> usize
pub fn num_promotions(&self) -> usize
Returns the number of promotions performed.
Auto Trait Implementations§
impl Freeze for TwoGenerationArena
impl RefUnwindSafe for TwoGenerationArena
impl Send for TwoGenerationArena
impl Sync for TwoGenerationArena
impl Unpin for TwoGenerationArena
impl UnsafeUnpin for TwoGenerationArena
impl UnwindSafe for TwoGenerationArena
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