Expand description
Mimalloc implemented in Rust (not a binding to the C library) with only basic features.
Lock-free multi-threading, security features, and some performance enhancements are not implemented.
It can be used in no_std environments.
§Crate Features
- mmap - Provide
MimallocMmapthat usesmmapas OS allocator for segments. - std_mutex - Provide
MimallocMutexWrapperthat wrapsMimallocinsidestd::sync::Mutexand implementsGlobalAlloc. - spin_mutex - Provide
MimallocMutexWrapperthat wrapsMimallocinsidespin::Mutexthat can be used inno_stdenvironments. - deferred_free - Enable registering a hook to complete deferred free events.
See the documentation of
mi_register_deferred_free.
Modules§
- deferred_
free deferred_free
Structs§
- Mimalloc
- The main allocator object.
- Mimalloc
Mutex Wrapper std_mutexorspin_mutex - Wrap
Mimallocinside aMutexand implementGlobalAlloc. - Mmap
Alloc mmap - A simple
mmap-based allocator that can be used to powerMimalloc.
Functions§
- new_
mimalloc_ mmap mmap - Create a new
MimallocMmapinstance by aconst fn. - new_
mimalloc_ mmap_ mutex mmapand (std_mutexorspin_mutex) - Create a new
MimallocMmapMutexinstance by aconst fn.
Type Aliases§
- Mimalloc
Mmap mmap Mimallocpowered bymmap(MmapAlloc).- Mimalloc
Mmap Mutex mmapand (std_mutexorspin_mutex) - Wrapper around
Mimallocwithmmapallocator and mutex.