pub struct Generation {
pub number: usize,
/* private fields */
}Expand description
Represents a generation in the generational heap
Fields§
§number: usizeGeneration number (0 = youngest)
Implementations§
Source§impl Generation
impl Generation
Sourcepub fn allocated_bytes(&self) -> usize
pub fn allocated_bytes(&self) -> usize
Get total allocated bytes
Sourcepub fn mark_survivor(&mut self, ptr: *const u8)
pub fn mark_survivor(&mut self, ptr: *const u8)
Mark an object as survivor for potential promotion
Sourcepub fn take_survivors(&mut self) -> Vec<usize>
pub fn take_survivors(&mut self) -> Vec<usize>
Get survivor objects for promotion
Sourcepub fn take_allocated_ptrs(&mut self) -> Vec<*const u8>
pub fn take_allocated_ptrs(&mut self) -> Vec<*const u8>
Drain allocated object pointers from this generation
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Generation
impl RefUnwindSafe for Generation
impl !Send for Generation
impl !Sync for Generation
impl Unpin for Generation
impl UnwindSafe for Generation
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