Trait runtime::memories::frag::Alloc

source ·
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

Required Associated Types§

Required Methods§

Allocates T, returns an error if something wrong happened. Takes an optional configuration to check against a previous allocation

Deallocate T, returns an error if something wrong happened.

Implementors§