pub struct RegionSnapshot {
pub name: String,
pub current_bytes: u64,
pub peak_bytes: u64,
pub total_allocated: u64,
pub total_deallocated: u64,
pub allocation_count: u64,
pub deallocation_count: u64,
}Expand description
Snapshot of a memory region.
Fields§
§name: StringRegion name.
current_bytes: u64Current memory usage in bytes.
peak_bytes: u64Peak memory usage in bytes.
total_allocated: u64Total bytes allocated.
total_deallocated: u64Total bytes deallocated.
allocation_count: u64Number of allocations.
deallocation_count: u64Number of deallocations.
Implementations§
Source§impl RegionSnapshot
impl RegionSnapshot
Sourcepub fn fragmentation_ratio(&self) -> f64
pub fn fragmentation_ratio(&self) -> f64
Calculate fragmentation ratio (allocations / deallocations).
Sourcepub fn average_allocation_size(&self) -> u64
pub fn average_allocation_size(&self) -> u64
Calculate average allocation size.
Trait Implementations§
Source§impl Clone for RegionSnapshot
impl Clone for RegionSnapshot
Source§fn clone(&self) -> RegionSnapshot
fn clone(&self) -> RegionSnapshot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RegionSnapshot
impl Debug for RegionSnapshot
Source§impl<'de> Deserialize<'de> for RegionSnapshot
impl<'de> Deserialize<'de> for RegionSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RegionSnapshot
impl RefUnwindSafe for RegionSnapshot
impl Send for RegionSnapshot
impl Sync for RegionSnapshot
impl Unpin for RegionSnapshot
impl UnsafeUnpin for RegionSnapshot
impl UnwindSafe for RegionSnapshot
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