pub struct AllocTrack<T: GlobalAlloc> { /* private fields */ }Expand description
Global memory allocator wrapper that can track per-thread and per-backtrace memory usage.
Implementations§
Source§impl<T: GlobalAlloc> AllocTrack<T>
impl<T: GlobalAlloc> AllocTrack<T>
Sourcepub const fn new(inner: T, backtrace: BacktraceMode) -> Self
pub const fn new(inner: T, backtrace: BacktraceMode) -> Self
Trait Implementations§
Source§impl<T: GlobalAlloc> GlobalAlloc for AllocTrack<T>
impl<T: GlobalAlloc> GlobalAlloc for AllocTrack<T>
Source§unsafe fn alloc(&self, layout: Layout) -> *mut u8
unsafe fn alloc(&self, layout: Layout) -> *mut u8
Allocates memory as described by the given
layout. Read moreAuto Trait Implementations§
impl<T> Freeze for AllocTrack<T>where
T: Freeze,
impl<T> RefUnwindSafe for AllocTrack<T>where
T: RefUnwindSafe,
impl<T> Send for AllocTrack<T>where
T: Send,
impl<T> Sync for AllocTrack<T>where
T: Sync,
impl<T> Unpin for AllocTrack<T>where
T: Unpin,
impl<T> UnwindSafe for AllocTrack<T>where
T: UnwindSafe,
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