pub struct AllocatorStats {
pub total_allocations: AtomicUsize,
pub total_deallocations: AtomicUsize,
pub bytes_allocated: AtomicUsize,
pub bytes_deallocated: AtomicUsize,
pub aligned_allocations: AtomicUsize,
pub peak_memory_usage: AtomicUsize,
}Expand description
Statistics for SIMD allocator performance monitoring
Fields§
§total_allocations: AtomicUsize§total_deallocations: AtomicUsize§bytes_allocated: AtomicUsize§bytes_deallocated: AtomicUsize§aligned_allocations: AtomicUsize§peak_memory_usage: AtomicUsizeImplementations§
Source§impl AllocatorStats
impl AllocatorStats
pub fn new() -> Self
pub fn record_allocation(&self, size: usize, aligned: bool)
pub fn record_deallocation(&self, size: usize)
pub fn current_memory_usage(&self) -> usize
pub fn allocation_efficiency(&self) -> f64
Trait Implementations§
Source§impl Debug for AllocatorStats
impl Debug for AllocatorStats
Source§impl Default for AllocatorStats
impl Default for AllocatorStats
Source§fn default() -> AllocatorStats
fn default() -> AllocatorStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for AllocatorStats
impl RefUnwindSafe for AllocatorStats
impl Send for AllocatorStats
impl Sync for AllocatorStats
impl Unpin for AllocatorStats
impl UnsafeUnpin for AllocatorStats
impl UnwindSafe for AllocatorStats
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
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