Struct mimalloc_rust::GlobalMiMalloc
source · [−]pub struct GlobalMiMalloc;Expand description
The global allocator
Implementations
sourceimpl GlobalMiMalloc
impl GlobalMiMalloc
sourcepub fn replace_by<T: Deref<Target = *mut mi_heap_t>>(
heap: &MiMallocHeap<T>
) -> MiMallocHeapGlobal
pub fn replace_by<T: Deref<Target = *mut mi_heap_t>>(
heap: &MiMallocHeap<T>
) -> MiMallocHeapGlobal
replace the global allocator by a heap
sourcepub fn get() -> MiMallocHeapGlobal
pub fn get() -> MiMallocHeapGlobal
get the default heap type of the global allocator holds
pub fn option_disable(option: mi_option_t)
pub fn option_enable(option: mi_option_t)
pub fn option_get(option: mi_option_t) -> c_long
pub fn option_is_enabled(option: mi_option_t) -> bool
pub fn option_set(option: mi_option_t, value: c_long)
pub fn option_set_default(option: mi_option_t, value: c_long)
pub fn option_set_enabled(option: mi_option_t)
pub fn option_set_enabled_default(option: mi_option_t)
Trait Implementations
sourceimpl Debug for GlobalMiMalloc
impl Debug for GlobalMiMalloc
sourceimpl GlobalAlloc for GlobalMiMalloc
impl GlobalAlloc for GlobalMiMalloc
sourceunsafe fn alloc(&self, layout: Layout) -> *mut u8
unsafe fn alloc(&self, layout: Layout) -> *mut u8
Allocate memory as described by the given layout. Read more
sourceunsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout)
unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout)
Deallocate the block of memory at the given ptr pointer with the given layout. Read more
Auto Trait Implementations
impl RefUnwindSafe for GlobalMiMalloc
impl Send for GlobalMiMalloc
impl Sync for GlobalMiMalloc
impl Unpin for GlobalMiMalloc
impl UnwindSafe for GlobalMiMalloc
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more