[−][src]Struct swim_c::stdlib::MallocHeap
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<'b, S, T> StowFrom for T where
S: Stow<'b, T>,
[src]
S: Stow<'b, T>,
default fn try_stow_from(
src: S,
hold: &dyn Hold<'b>
) -> Result<T, (S, HoldError)>
[src]
src: S,
hold: &dyn Hold<'b>
) -> Result<T, (S, HoldError)>
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]
T: StowFrom<'b, S>,