Trait dbkit_engine::allocator::Allocator [] [src]

pub trait Allocator: Send + Sync {
    fn allocate(&self, size: usize) -> Result<OwnedChunkDBError>;
    fn allocate_aligned(&self, size: usize, align: usize) -> Result<OwnedChunkDBError>;
    unsafe fn resize<'a>(&self, prev: &mut OwnedChunk<'a>, size: usize) -> Option<DBError>;
    fn putback(&self, data: &mut OwnedChunk);
}

Allocator trait, used through out the operations in dbkit.

Allocators have to maintain their own synchornization

Required Methods

Resize; will try to resize in place if possible

Implementors