pub struct FerroAllocator;Expand description
Drop-in global allocator that wraps the system allocator and records every
heap operation into EVENT_QUEUE for streaming to the ferroalloc analyzer.
§Usage
use ferroalloc_probe::{FerroAllocator, start_flush_thread};
#[global_allocator]
static ALLOC: FerroAllocator = FerroAllocator;
fn main() {
start_flush_thread(7777);
// ... rest of your program
}Trait Implementations§
Source§impl GlobalAlloc for FerroAllocator
impl GlobalAlloc for FerroAllocator
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 FerroAllocator
impl RefUnwindSafe for FerroAllocator
impl Send for FerroAllocator
impl Sync for FerroAllocator
impl Unpin for FerroAllocator
impl UnsafeUnpin for FerroAllocator
impl UnwindSafe for FerroAllocator
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