pub(crate) struct Counting;Expand description
The system allocator, counting what goes through it.
A reallocation is counted as one allocation of the new size, because that
is what it costs: a growing Vec that doubles four times allocated four
times. A free is not counted at all, since what this is measuring is
pressure rather than residency.
Trait Implementations§
Source§impl GlobalAlloc for Counting
impl GlobalAlloc for Counting
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 Freeze for Counting
impl RefUnwindSafe for Counting
impl Send for Counting
impl Sync for Counting
impl Unpin for Counting
impl UnsafeUnpin for Counting
impl UnwindSafe for Counting
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