Struct stats_alloc::StatsAlloc
source · [−]pub struct StatsAlloc<T: GlobalAlloc> { /* private fields */ }
Expand description
An instrumenting middleware which keeps track of allocation, deallocation, and reallocation requests to the underlying global allocator.
Implementations
sourceimpl StatsAlloc<System>
impl StatsAlloc<System>
sourceimpl<T: GlobalAlloc> StatsAlloc<T>
impl<T: GlobalAlloc> StatsAlloc<T>
Trait Implementations
sourceimpl<T: Debug + GlobalAlloc> Debug for StatsAlloc<T>
impl<T: Debug + GlobalAlloc> Debug for StatsAlloc<T>
sourceimpl<T: Default + GlobalAlloc> Default for StatsAlloc<T>
impl<T: Default + GlobalAlloc> Default for StatsAlloc<T>
sourcefn default() -> StatsAlloc<T>
fn default() -> StatsAlloc<T>
Returns the “default value” for a type. Read more
sourceimpl<'a, T: GlobalAlloc + 'a> GlobalAlloc for &'a StatsAlloc<T>
impl<'a, T: GlobalAlloc + 'a> GlobalAlloc for &'a StatsAlloc<T>
sourceunsafe fn alloc(&self, layout: Layout) -> *mut u8
unsafe fn alloc(&self, layout: Layout) -> *mut u8
Allocate memory as described by the given layout
. Read more
sourceunsafe fn dealloc(&self, ptr: *mut u8, layout: Layout)
unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout)
Deallocate the block of memory at the given ptr
pointer with the given layout
. Read more
sourceimpl<T: GlobalAlloc> GlobalAlloc for StatsAlloc<T>
impl<T: GlobalAlloc> GlobalAlloc for StatsAlloc<T>
sourceunsafe fn alloc(&self, layout: Layout) -> *mut u8
unsafe fn alloc(&self, layout: Layout) -> *mut u8
Allocate memory as described by the given layout
. Read more
sourceunsafe fn dealloc(&self, ptr: *mut u8, layout: Layout)
unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout)
Deallocate the block of memory at the given ptr
pointer with the given layout
. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for StatsAlloc<T> where
T: RefUnwindSafe,
impl<T> Send for StatsAlloc<T> where
T: Send,
impl<T> Sync for StatsAlloc<T> where
T: Sync,
impl<T> Unpin for StatsAlloc<T> where
T: Unpin,
impl<T> UnwindSafe for StatsAlloc<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more