rusty_alloc-api
The safe Rust surface over rusty_alloc,
a pure-Rust remake of mimalloc that measures at-or-below mimalloc on
instructions retired — on real programs and on every operation of the per-op
scan — while detecting double frees that upstream silently accepts.
Status: 0.7.0 — a 0.x release. See the
rusty_alloc crate page for the
performance evidence and its scope (instruction counts, not wall-clock).
Upgrade from 0.3.x or earlier — mandatory. 0.4.0 fixed three platform-independent use-after-frees; treat 0.3.2 and earlier as unsound on every target.
What it gives you
GlobalAlloc— drop it in as#[global_allocator].- First-class heaps — create independent heaps, allocate from them, destroy them wholesale.
Allocator— the unstableallocator_apitrait, behind a feature.
use RustyAlloc;
static ALLOC: RustyAlloc = RustyAlloc;
Features
debug_checks, secure, profile — each forwards to the identically-named
feature on rusty_alloc.
License
MIT. See LICENSE at the repository root.