Trait drone_core::heap::Allocator[][src]

pub trait Allocator: Sized {
    const POOL_COUNT: usize;
    const TRACE_PORT: Option<u8>;

    unsafe fn get_pool_unchecked<I>(&self, index: I) -> &I::Output
    where
        I: SliceIndex<[Pool]>
; }

Allocator for a generic memory pools layout.

The trait is supposed to be implemented for an array of pools. heap macro should be used to generate the concrete type and the implementation.

Associated Constants

const POOL_COUNT: usize[src]

The total number of memory pools.

const TRACE_PORT: Option<u8>[src]

Logger port for heap tracing. Disabled if None.

Loading content...

Required methods

unsafe fn get_pool_unchecked<I>(&self, index: I) -> &I::Output where
    I: SliceIndex<[Pool]>, 
[src]

Returns a reference to a pool or subslice, without doing bounds checking.

Safety

Calling this method with an out-of-bounds index is Undefined Behavior.

Loading content...

Implementors

Loading content...