[−][src]Struct stats_alloc::Stats
Allocator statistics
Fields
allocations: usize
Count of allocation operations
deallocations: usize
Count of deallocation operations
reallocations: usize
Count of reallocation operations
An example where reallocation may occur: resizing of a Vec<T>
when
its length would excceed its capacity. Excessive reallocations may
indicate that resizable data structures are being created with
insufficient or poorly estimated initial capcities.
let mut x = Vec::with_capacity(1); x.push(0); x.push(1); // Potential reallocation
bytes_allocated: usize
Total bytes requested by allocations
bytes_deallocated: usize
Total bytes freed by deallocations
bytes_reallocated: isize
Total of bytes requested minus bytes freed by reallocations
This number is positive if the total bytes requested by reallocation operations is greater than the total bytes freed by reallocations. A positive value indicates that resizable structures are growing, while a negative value indicates that such structures are shrinking.
Trait Implementations
impl Copy for Stats
[src]
impl PartialEq<Stats> for Stats
[src]
impl Eq for Stats
[src]
impl Clone for Stats
[src]
fn clone(&self) -> Stats
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Stats
[src]
impl Hash for Stats
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Sub<Stats> for Stats
[src]
type Output = Stats
The resulting type after applying the -
operator.
fn sub(self, rhs: Self) -> Self::Output
[src]
impl SubAssign<Stats> for Stats
[src]
fn sub_assign(&mut self, rhs: Self)
[src]
impl Debug for Stats
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,