pub struct CountingAllocator<A = System>(/* private fields */);Expand description
No-op counterpart of the tracking allocator: a pure pass-through to the
inner allocator, so a #[global_allocator] declaration compiles unchanged
with the hotpath-meta feature disabled.
Implementations§
Source§impl<A> CountingAllocator<A>
impl<A> CountingAllocator<A>
Trait Implementations§
Source§impl<A: Default> Default for CountingAllocator<A>
impl<A: Default> Default for CountingAllocator<A>
Source§impl<A> GlobalAlloc for CountingAllocator<A>where
A: GlobalAlloc,
impl<A> GlobalAlloc for CountingAllocator<A>where
A: GlobalAlloc,
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 CountingAllocator<A>where
A: Freeze,
impl<A> RefUnwindSafe for CountingAllocator<A>where
A: RefUnwindSafe,
impl<A> Send for CountingAllocator<A>where
A: Send,
impl<A> Sync for CountingAllocator<A>where
A: Sync,
impl<A> Unpin for CountingAllocator<A>where
A: Unpin,
impl<A> UnsafeUnpin for CountingAllocator<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for CountingAllocator<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