Registry / utility / mimalloc

mimalloc

JSON →
library0.1.52rscratesunverified

Performance and security oriented drop-in allocator for Rust, based on Microsoft's mimalloc.

# Cargo.toml [dependencies] mimalloc = "0.1.52"
INSTALL
IMPORT
SIG · MIMALLOC
M
mimalloc
utilityrustv0.1.52
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MiMalloc
use mimalloc::MiMalloc;

Set mimalloc as the global allocator for improved performance.

use mimalloc::MiMalloc; #[global_allocator] static GLOBAL: MiMalloc = MiMalloc; fn main() { let v = vec![1,2,3]; println!("Vector allocated with mimalloc: {:?}", v); }
Debug
Known issues
gotchaMay cause issues with some FFI code that expects the system allocator.
fix
Use `#[global_allocator]` only if you control all allocations, or use per-allocator scoping.
affects: >=0.1.0
Upgrade
Version history
0.1.52latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
mimalloc — cargo add mimalloc · libregistry