Skip to main content

ExternalAllocator

Trait ExternalAllocator 

Source
pub trait ExternalAllocator {
    // Required methods
    fn allocate(&mut self, size: usize) -> Result<NonNull<u8>, ArenaError>;
    fn deallocate(&mut self, ptr: NonNull<u8>, size: usize);
}
Expand description

External allocator trait for growing arenas

Required Methods§

Source

fn allocate(&mut self, size: usize) -> Result<NonNull<u8>, ArenaError>

Source

fn deallocate(&mut self, ptr: NonNull<u8>, size: usize)

Implementors§