Struct rlsf::GlobalTlsf[][src]

pub struct GlobalTlsf<Options: GlobalTlsfOptions = ()> { /* fields omitted */ }
This is supported on WebAssembly and non-target feature atomics, or Unix only.
Expand description

Tlsf as a global allocator.

Implementations

impl<Options: GlobalTlsfOptions> GlobalTlsf<Options>[src]

pub const INIT: Self[src]

The initializer.

Trait Implementations

impl<Options: GlobalTlsfOptions> CAlloc for GlobalTlsf<Options>[src]

fn allocate(&self, layout: Layout) -> Option<NonNull<u8>>[src]

Allocate a memory block. Read more

unsafe fn deallocate(&self, ptr: NonNull<u8>)[src]

Deallocate a previously allocated memory block. Read more

unsafe fn reallocate(
    &self,
    ptr: NonNull<u8>,
    new_layout: Layout
) -> Option<NonNull<u8>>
[src]

Shrink or grow a previously allocated memory block. Read more

impl<Options: GlobalTlsfOptions> GlobalAlloc for GlobalTlsf<Options>[src]

unsafe fn alloc(&self, layout: Layout) -> *mut u8[src]

Allocate memory as described by the given layout. Read more

unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout)[src]

Deallocate the block of memory at the given ptr pointer with the given layout. Read more

unsafe fn realloc(
    &self,
    ptr: *mut u8,
    layout: Layout,
    new_size: usize
) -> *mut u8
[src]

Shrink or grow a block of memory to the given new_size. The block is described by the given ptr pointer and layout. Read more

unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u81.28.0[src]

Behaves like alloc, but also ensures that the contents are set to zero before being returned. Read more

impl<Options: GlobalTlsfOptions> Init for GlobalTlsf<Options>[src]

const INIT: Self[src]

Self’s default value.

impl<Options: GlobalTlsfOptions> Send for GlobalTlsf<Options>[src]

impl<Options: GlobalTlsfOptions> Sync for GlobalTlsf<Options>[src]

Auto Trait Implementations

impl<Options = ()> !RefUnwindSafe for GlobalTlsf<Options>

impl<Options> Unpin for GlobalTlsf<Options> where
    Options: Unpin

impl<Options> UnwindSafe for GlobalTlsf<Options> where
    Options: UnwindSafe

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.