Struct mimalloc2_rust::GlobalMiMalloc
source · pub struct GlobalMiMalloc;
Expand description
The global allocator
Implementations§
source§impl 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§
source§impl Debug for GlobalMiMalloc
impl Debug for GlobalMiMalloc
source§impl GlobalAlloc for GlobalMiMalloc
impl GlobalAlloc for GlobalMiMalloc
source§unsafe fn alloc(&self, layout: Layout) -> *mut u8
unsafe fn alloc(&self, layout: Layout) -> *mut u8
Allocate memory as described by the given
layout
. Read moreAuto Trait Implementations§
impl Freeze for GlobalMiMalloc
impl RefUnwindSafe for GlobalMiMalloc
impl Send for GlobalMiMalloc
impl Sync for GlobalMiMalloc
impl Unpin for GlobalMiMalloc
impl UnwindSafe for GlobalMiMalloc
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more