pub trait Alloc<T: Default + Clone> {
type Error;
fn alloc(config: Option<FragConfig>) -> Result<Frag<T>, Self::Error>;
fn dealloc(frag: &mut Frag<T>) -> Result<(), Self::Error>;
}
Expand description
Custom allocator trait
pub trait Alloc<T: Default + Clone> {
type Error;
fn alloc(config: Option<FragConfig>) -> Result<Frag<T>, Self::Error>;
fn dealloc(frag: &mut Frag<T>) -> Result<(), Self::Error>;
}
Custom allocator trait