pub struct HeapStats {
pub live_count: usize,
pub live_bytes: usize,
}Expand description
Lightweight allocation statistics for tests and debugging.
Fields§
§live_count: usizeNumber of live collectable allocations.
live_bytes: usizeBlock bytes the last sweep found still live. Zero on a heap that has
never collected, and block bytes only — see Heap::live_bytes.
On HeapStats rather than behind a #[cfg(test)] accessor because
the property it makes checkable — a long-running program’s heap stops
growing — is an end-to-end property, and the test that says so belongs
where generated code runs (praxis-codegen-cranelift’s jit.rs), not
in this crate.
Trait Implementations§
impl Copy for HeapStats
impl Eq for HeapStats
impl StructuralPartialEq for HeapStats
Auto Trait Implementations§
impl Freeze for HeapStats
impl RefUnwindSafe for HeapStats
impl Send for HeapStats
impl Sync for HeapStats
impl Unpin for HeapStats
impl UnsafeUnpin for HeapStats
impl UnwindSafe for HeapStats
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