pub trait Allocator {
    fn alloc(&mut self, size: usize) -> RawMemPtr;
fn dealloc(&mut self, ptr: RawMemPtr);
fn realloc(&mut self, ptr: RawMemPtr, new_size: usize) -> RawMemPtr;
fn usable_size(ptr: RawMemPtr) -> usize
    where
        Self: Sized
; }
This is supported on crate feature allocator only.
Expand description

The allocator interface

Required methods

Allocate new memory

De-allocate previously allocated memory

Re-allocate previously allocated memory

Get usable size of allocated memory region

Implementors