Struct allocators::composable::Proxy [] [src]

pub struct Proxy<A, L> {
    // some fields omitted
}

This wraps an allocator and a logger, logging all allocations and deallocations.

Methods

impl<A: Allocator, L: ProxyLogger> Proxy<A, L>

fn new(alloc: A, logger: L) -> Self

Create a new proxy allocator.

Trait Implementations

impl<A: Allocator, L: ProxyLogger> Allocator for Proxy<A, L>

unsafe fn allocate_raw(&self, size: usize, align: usize) -> Result<Block, Error>

unsafe fn reallocate_raw<'a>(&'a self, block: Block<'a>, new_size: usize) -> Result<Block<'a>, (Error, Block<'a>)>

unsafe fn deallocate_raw(&self, block: Block)

fn allocate<T>(&self, val: T) -> Result<AllocBox<T, Self>, (Error, T)> where Self: Sized

fn make_place<T>(&self) -> Result<Place<T, Self>, Error> where Self: Sized