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

pub trait Allocator: Sized {
    pub const POOL_COUNT: usize;

    pub 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

pub const POOL_COUNT: usize[src]

The total number of memory pools.

Loading content...

Required methods

pub 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...