pub struct ProfilingAllocator<A> { /* private fields */ }Expand description
Optional zero-overhead-when-unused counting allocator wrapper that host apps (or --features profiling
builds) can install as #[global_allocator] to measure real per-frame heap allocation count and bytes.
Example:
ⓘ
#[global_allocator]
static ALLOC: strata::ProfilingAllocator<std::alloc::System> =
strata::ProfilingAllocator::new(std::alloc::System);Implementations§
Source§impl<A> ProfilingAllocator<A>
impl<A> ProfilingAllocator<A>
Trait Implementations§
Source§impl<A: GlobalAlloc> GlobalAlloc for ProfilingAllocator<A>
impl<A: GlobalAlloc> GlobalAlloc for ProfilingAllocator<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> Forget for ProfilingAllocator<A>
impl<A> Freeze for ProfilingAllocator<A>where
A: Freeze,
impl<A> Move for ProfilingAllocator<A>
impl<A> RefUnwindSafe for ProfilingAllocator<A>where
A: RefUnwindSafe,
impl<A> Send for ProfilingAllocator<A>where
A: Send,
impl<A> Sync for ProfilingAllocator<A>where
A: Sync,
impl<A> Unpin for ProfilingAllocator<A>where
A: Unpin,
impl<A> UnsafeUnpin for ProfilingAllocator<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for ProfilingAllocator<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