[][src]Struct polymorph_allocator::Allocator

pub struct Allocator {
    pub first_region: usize,
}

Fields

first_region: usize

Methods

impl Allocator[src]

pub const fn empty() -> Allocator[src]

pub fn min_allocation_size() -> usize[src]

pub unsafe fn add_region(&mut self, addr: usize, size: usize)[src]

pub fn get_region_first(&self) -> Option<&mut Region>[src]

pub fn get_region_first_free(&self, size: usize) -> Option<&mut Region>[src]

pub fn get_region_for_ptr(&self, ptr: *mut u8) -> Option<&mut Region>[src]

pub fn allocate(&mut self, layout: Layout) -> Result<NonNull<u8>, AllocErr>[src]

pub fn deallocate(&mut self, ptr: NonNull<u8>, _layout: Layout)[src]

Auto Trait Implementations

impl Unpin for Allocator

impl Send for Allocator

impl Sync for Allocator

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]