pub struct GenerationalHeap { /* private fields */ }Expand description
Manages all generations in the heap
Implementations§
Source§impl GenerationalHeap
impl GenerationalHeap
pub fn new(config: &GcConfig) -> Self
Sourcepub fn generation(&self, number: usize) -> Option<&Generation>
pub fn generation(&self, number: usize) -> Option<&Generation>
Get a specific generation
Sourcepub fn young_generation(&self) -> &Generation
pub fn young_generation(&self) -> &Generation
Get the young generation (generation 0)
Sourcepub fn generations(&self) -> &[Generation]
pub fn generations(&self) -> &[Generation]
Get all generations
Sourcepub fn num_generations(&self) -> usize
pub fn num_generations(&self) -> usize
Get number of generations
Sourcepub fn should_collect_minor(&self) -> bool
pub fn should_collect_minor(&self) -> bool
Check if minor GC should be triggered
Sourcepub fn should_collect_major(&self) -> bool
pub fn should_collect_major(&self) -> bool
Check if major GC should be triggered
Sourcepub fn total_utilization(&self) -> f64
pub fn total_utilization(&self) -> f64
Get total heap utilization
Sourcepub fn total_current_size(&self) -> usize
pub fn total_current_size(&self) -> usize
Get total current size
Sourcepub fn total_max_size(&self) -> usize
pub fn total_max_size(&self) -> usize
Get total maximum size
Sourcepub fn record_promotion(&self, _from_gen: usize, _to_gen: usize, _count: usize)
pub fn record_promotion(&self, _from_gen: usize, _to_gen: usize, _count: usize)
Record object promotion between generations
Sourcepub fn record_demotion(&self, _from_gen: usize, _to_gen: usize, _count: usize)
pub fn record_demotion(&self, _from_gen: usize, _to_gen: usize, _count: usize)
Record object demotion (rare, but possible in some algorithms)
Sourcepub fn adapt_generation_sizes(&mut self) -> Result<()>
pub fn adapt_generation_sizes(&mut self) -> Result<()>
Adapt generation sizes based on allocation patterns
Sourcepub fn reconfigure(&mut self, config: &GcConfig) -> Result<()>
pub fn reconfigure(&mut self, config: &GcConfig) -> Result<()>
Reconfigure the heap
Sourcepub fn stats(&self) -> GenerationalHeapStats
pub fn stats(&self) -> GenerationalHeapStats
Get comprehensive heap statistics
Auto Trait Implementations§
impl !Freeze for GenerationalHeap
impl !RefUnwindSafe for GenerationalHeap
impl Send for GenerationalHeap
impl Sync for GenerationalHeap
impl Unpin for GenerationalHeap
impl UnwindSafe for GenerationalHeap
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