Crates.io | baby-mimalloc |
lib.rs | baby-mimalloc |
version | |
source | src |
created_at | 2024-12-09 07:49:50.76186 |
updated_at | 2024-12-09 10:00:01.418903 |
description | Mimalloc implemented in Rust (not a binding to the C library) with only basic features. |
homepage | |
repository | https://github.com/ouuan/baby-mimalloc |
max_upload_size | |
id | 1477073 |
Cargo.toml error: | TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
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.
MimallocMmap
that uses mmap
as OS allocator for segments.MimallocMutexWrapper
that wraps Mimalloc
inside std::sync::Mutex
and implements GlobalAlloc
.MimallocMutexWrapper
that wraps Mimalloc
inside spin::Mutex
that can be used in no_std
environments.mi_register_deferred_free
.[dependencies]
baby-mimalloc = { version = "*", features = ["mmap", "std_mutex"] }
# baby-mimalloc = { version = "*", features = ["mmap", "spin_mutex"] }
use baby_mimalloc::{new_mimalloc_mmap_mutex, MimallocMmapMutex};
#[global_allocator]
static ALLOCATOR: MimallocMmapMutex = new_mimalloc_mmap_mutex();