Struct rpmalloc::RpMalloc[][src]

pub struct RpMalloc;
Expand description

rpmalloc global allocator wrapper

Implementations

impl RpMalloc[src]

pub fn global_stats() -> rpmalloc_global_statistics_t[src]

Retrieve global allocation stats.

Some of the fields in these will only be used if the statistics feature is enabled

pub fn thread_stats() -> rpmalloc_thread_statistics_t[src]

Retrieve allocation stats for the current thread.

Some of the fields in these will only be used if the statistics feature is enabled

Trait Implementations

impl GlobalAlloc for RpMalloc[src]

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

Allocate memory as described by the given layout. Read more

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

Behaves like alloc, but also ensures that the contents are set to zero before being returned. 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
1.28.0[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

Auto Trait Implementations

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.