pub struct TrackedAllocator { /* private fields */ }Expand description
A wrapper allocator that tracks allocations.
Use this as the global allocator to enable automatic tracking:
ⓘ
use prax_query::profiling::TrackedAllocator;
#[global_allocator]
static ALLOC: TrackedAllocator = TrackedAllocator::new();Implementations§
Trait Implementations§
Source§impl Default for TrackedAllocator
impl Default for TrackedAllocator
Source§impl GlobalAlloc for TrackedAllocator
impl GlobalAlloc for TrackedAllocator
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 TrackedAllocator
impl RefUnwindSafe for TrackedAllocator
impl Send for TrackedAllocator
impl Sync for TrackedAllocator
impl Unpin for TrackedAllocator
impl UnwindSafe for TrackedAllocator
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