pub struct ArenaStats {
pub total_allocations: AtomicU64,
pub bytes_allocated: AtomicUsize,
pub resets: AtomicU64,
pub peak_usage: AtomicUsize,
}Expand description
Arena statistics
Fields§
§total_allocations: AtomicU64Total allocations
bytes_allocated: AtomicUsizeTotal bytes allocated
resets: AtomicU64Number of arena resets
peak_usage: AtomicUsizePeak memory usage
Implementations§
Source§impl ArenaStats
impl ArenaStats
Sourcepub fn record_allocation(&self, size: usize)
pub fn record_allocation(&self, size: usize)
Record an allocation
Sourcepub fn record_reset(&self, bytes_freed: usize)
pub fn record_reset(&self, bytes_freed: usize)
Record a reset
Sourcepub fn allocation_rate(&self) -> f64
pub fn allocation_rate(&self) -> f64
Get allocation rate
Trait Implementations§
Source§impl Debug for ArenaStats
impl Debug for ArenaStats
Source§impl Default for ArenaStats
impl Default for ArenaStats
Source§fn default() -> ArenaStats
fn default() -> ArenaStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for ArenaStats
impl RefUnwindSafe for ArenaStats
impl Send for ArenaStats
impl Sync for ArenaStats
impl Unpin for ArenaStats
impl UnsafeUnpin for ArenaStats
impl UnwindSafe for ArenaStats
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