pub struct ProfilingAllocator<const CPU_FREQ: u32 = 99>;Expand description
A profiling allocator that wraps the system allocator.
The const generic CPU_FREQ specifies the CPU sampling frequency in Hz.
Set to 0 to disable CPU profiling.
When the heap feature is enabled, this allocator captures
allocation and deallocation events along with stack traces.
CPU profiling (if enabled) starts automatically on the first allocation.
When profiling features are disabled, it’s a zero-cost passthrough.
Implementations§
Trait Implementations§
Source§impl<const CPU_FREQ: u32> Default for ProfilingAllocator<CPU_FREQ>
impl<const CPU_FREQ: u32> Default for ProfilingAllocator<CPU_FREQ>
Source§impl<const CPU_FREQ: u32> GlobalAlloc for ProfilingAllocator<CPU_FREQ>
impl<const CPU_FREQ: u32> GlobalAlloc for ProfilingAllocator<CPU_FREQ>
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<const CPU_FREQ: u32> Freeze for ProfilingAllocator<CPU_FREQ>
impl<const CPU_FREQ: u32> RefUnwindSafe for ProfilingAllocator<CPU_FREQ>
impl<const CPU_FREQ: u32> Send for ProfilingAllocator<CPU_FREQ>
impl<const CPU_FREQ: u32> Sync for ProfilingAllocator<CPU_FREQ>
impl<const CPU_FREQ: u32> Unpin for ProfilingAllocator<CPU_FREQ>
impl<const CPU_FREQ: u32> UnwindSafe for ProfilingAllocator<CPU_FREQ>
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