pub struct Tracking<A>(pub A);Expand description
Global allocator wrapper that tracks live bytes and a resettable high-water mark.
Counters use relaxed ordering: they are diagnostics, not synchronisation, and the cost must stay near zero on the allocation path.
Tuple Fields§
§0: ATrait Implementations§
Source§impl<A: GlobalAlloc> GlobalAlloc for Tracking<A>
impl<A: GlobalAlloc> GlobalAlloc for Tracking<A>
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<A> Freeze for Tracking<A>where
A: Freeze,
impl<A> RefUnwindSafe for Tracking<A>where
A: RefUnwindSafe,
impl<A> Send for Tracking<A>where
A: Send,
impl<A> Sync for Tracking<A>where
A: Sync,
impl<A> Unpin for Tracking<A>where
A: Unpin,
impl<A> UnsafeUnpin for Tracking<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for Tracking<A>where
A: 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