Trait allocators::composable::ProxyLogger
[−]
[src]
pub trait ProxyLogger { fn allocate_success(&mut self, block: &Block); fn allocate_fail(&mut self, err: &Error, size: usize, align: usize); fn deallocate(&mut self, block: &Block); fn reallocate_success(&mut self, old_block: &Block, new_block: &Block); fn reallocate_fail(&mut self, err: &Error, block: &Block, req_size: usize); }
Something that logs an allocator's activity. In practice, this may be an output stream, a data collector, or seomthing else entirely.
Required Methods
fn allocate_success(&mut self, block: &Block)
Called after a successful allocation.
fn allocate_fail(&mut self, err: &Error, size: usize, align: usize)
Called after a failed allocation.
fn deallocate(&mut self, block: &Block)
Called when deallocating a block.
fn reallocate_success(&mut self, old_block: &Block, new_block: &Block)
Called after a successful reallocation.
fn reallocate_fail(&mut self, err: &Error, block: &Block, req_size: usize)
Called after a failed reallocation.