pub struct InstrumentedSystemAllocator { /* private fields */ }Expand description
Rust’s System global allocator instrumented with allocation counters.
The counters track requested bytes, excluding allocator metadata, alignment padding, and fragmentation. All instances contribute to the same counters; install exactly one as the process global allocator.
Implementations§
Trait Implementations§
Source§impl GlobalAlloc for InstrumentedSystemAllocator
impl GlobalAlloc for InstrumentedSystemAllocator
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 moreSource§unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8
unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8
Behaves like
alloc, but also ensures that the contents
are set to zero before being returned. Read moreAuto Trait Implementations§
impl Freeze for InstrumentedSystemAllocator
impl RefUnwindSafe for InstrumentedSystemAllocator
impl Send for InstrumentedSystemAllocator
impl Sync for InstrumentedSystemAllocator
impl Unpin for InstrumentedSystemAllocator
impl UnsafeUnpin for InstrumentedSystemAllocator
impl UnwindSafe for InstrumentedSystemAllocator
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