Struct allocators::HeapAllocator [] [src]

pub struct HeapAllocator;

Allocator stub that just forwards to heap allocation. It is recommended to use the HEAP constant instead of creating a new instance of this, to benefit from the static lifetime that it provides.

Trait Implementations

impl Allocator for HeapAllocator

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

Derived Implementations

impl Debug for HeapAllocator

fn fmt(&self, __arg_0: &mut Formatter) -> Result