pub struct MemoryStatistics {
pub device_stats: HashMap<Device, MemoryPoolStats>,
pub total_allocations: usize,
pub total_deallocations: usize,
pub current_memory_tracked: usize,
pub peak_memory_tracked: usize,
pub active_alias_buffers: usize,
pub active_alias_views: usize,
}Expand description
Comprehensive memory statistics across all subsystems
Fields§
§device_stats: HashMap<Device, MemoryPoolStats>§total_allocations: usize§total_deallocations: usize§current_memory_tracked: usize§peak_memory_tracked: usize§active_alias_buffers: usize§active_alias_views: usizeImplementations§
Source§impl MemoryStatistics
impl MemoryStatistics
Sourcepub fn total_allocated(&self) -> usize
pub fn total_allocated(&self) -> usize
Get total memory allocated across all devices
Sourcepub fn total_free(&self) -> usize
pub fn total_free(&self) -> usize
Get total memory free across all devices
Sourcepub fn average_fragmentation(&self) -> f32
pub fn average_fragmentation(&self) -> f32
Get average fragmentation ratio across all devices
Sourcepub fn max_memory_pressure(&self) -> f32
pub fn max_memory_pressure(&self) -> f32
Get maximum memory pressure across all devices
Trait Implementations§
Source§impl Clone for MemoryStatistics
impl Clone for MemoryStatistics
Auto Trait Implementations§
impl Freeze for MemoryStatistics
impl RefUnwindSafe for MemoryStatistics
impl Send for MemoryStatistics
impl Sync for MemoryStatistics
impl Unpin for MemoryStatistics
impl UnsafeUnpin for MemoryStatistics
impl UnwindSafe for MemoryStatistics
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more