[][src]Struct swim_c::stdlib::MallocHeap

pub struct MallocHeap<'a> { /* fields omitted */ }

Block allocator backed by libc malloc.

Methods

impl<'a> MallocHeap<'a>[src]

pub const fn new(unit: usize) -> MallocHeap<'a>[src]

Returns a new Heap that allocates memory blocks with at least unit size bytes using libc malloc.

pub fn global() -> &'a MallocHeap<'a>[src]

Returns a reference to a Heap that allocates memory using libc malloc.

pub fn block_size(&self) -> usize[src]

Returns the minimum number of bytes in each memory block in this MallocHeap.

pub fn live(&self) -> usize[src]

Returns the number of currently allocated memory blocks in this MallocHeap.

Trait Implementations

impl<'a> Sync for MallocHeap<'a>[src]

impl<'a> Send for MallocHeap<'a>[src]

impl<'a> Heap<'a> for MallocHeap<'a>[src]

Blanket Implementations

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto 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, U> Into for T where
    U: From<T>, 
[src]

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

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

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

impl<'b, S, T> StowFrom for T where
    S: Stow<'b, T>, 
[src]

default fn stow_from(value: T, hold: &dyn Hold<'b>) -> Self[src]

impl<'b, S, T> StowInto for S where
    T: StowFrom<'b, S>, 
[src]

default fn stow_into(self, hold: &dyn Hold<'b>) -> T[src]