Struct sc_allocator::AllocationStats
source · #[non_exhaustive]pub struct AllocationStats {
pub bytes_allocated: u32,
pub bytes_allocated_peak: u32,
pub bytes_allocated_sum: u128,
pub address_space_used: u32,
}
Expand description
Memory allocation stats gathered during the lifetime of the allocator.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.bytes_allocated: u32
The current number of bytes allocated.
This represents how many bytes are allocated right now.
bytes_allocated_peak: u32
The peak number of bytes ever allocated.
This is the maximum the bytes_allocated
ever reached.
bytes_allocated_sum: u128
The sum of every allocation ever made.
This increases every time a new allocation is made.
address_space_used: u32
The amount of address space (in bytes) used by the allocator.
This is calculated as the difference between the allocator’s bumper and the heap base.
Currently the bumper’s only ever incremented, so this is simultaneously the current value as well as the peak value.
Trait Implementations§
source§impl Clone for AllocationStats
impl Clone for AllocationStats
source§fn clone(&self) -> AllocationStats
fn clone(&self) -> AllocationStats
Returns a copy 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 AllocationStats
impl Debug for AllocationStats
source§impl Default for AllocationStats
impl Default for AllocationStats
source§fn default() -> AllocationStats
fn default() -> AllocationStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for AllocationStats
impl Send for AllocationStats
impl Sync for AllocationStats
impl Unpin for AllocationStats
impl UnwindSafe for AllocationStats
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.