pub struct AllocInfo { /* private fields */ }
Expand description
Captures information about the allocations performed by a region under test.
Implementations§
Source§impl AllocInfo
impl AllocInfo
Sourcepub fn num_allocs(&self) -> u64
pub fn num_allocs(&self) -> u64
Returns the total number of allocations performed.
Sourcepub fn mem_allocated(&self) -> u64
pub fn mem_allocated(&self) -> u64
Returns the total amount of memory allocated.
Sourcepub fn mem_leaked(&self) -> u64
pub fn mem_leaked(&self) -> u64
Returns the total amount of memory leaked.
Sourcepub fn peak_mem(&self) -> u64
pub fn peak_mem(&self) -> u64
Returns peak memory usage, not including any overhead used by the allocator.
Sourcepub fn peak_mem_allocs(&self) -> u64
pub fn peak_mem_allocs(&self) -> u64
Returns the number of active allocations during peak memory usage.
Sourcepub fn result(&self) -> Result<(), AllocError>
pub fn result(&self) -> Result<(), AllocError>
Returns an Err(..)
result if any allocation bugs were detected.
Sourcepub fn tracing(&self) -> &TracingInfo
pub fn tracing(&self) -> &TracingInfo
Returns the detailed trace of leaks and errors.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AllocInfo
impl RefUnwindSafe for AllocInfo
impl !Send for AllocInfo
impl !Sync for AllocInfo
impl Unpin for AllocInfo
impl UnwindSafe for AllocInfo
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