Expand description
Safe Rust-native surface of rusty_alloc (plan §5.14).
From M2, RustyAlloc is a real core::alloc::GlobalAlloc:
ⓘ
#[global_allocator]
static ALLOC: rusty_alloc_api::RustyAlloc = rusty_alloc_api::RustyAlloc;Heap and the Allocator trait impl land at M6. This crate stays a thin
veneer over the same internals as the C ABI — no separate code path, so
corpus numbers speak for Rust users too.
Structs§
- Heap
- A first-class heap (plan §5.14):
Droprunsmi_heap_deletesemantics (blocks migrate to the thread’s backing heap and stay valid) unless built withHeap::new_destroyable, whereDropreleases every block at once. The destroyable form inherits C’s contract: callers must not touch its blocks after drop (a lifetime-carryingAllocatorimpl that makes this unrepresentable is the planned follow-up once allocator_api stabilizes). - Rusty
Alloc - The global allocator handle (zero-sized).
Constants§
- MI_
COMPAT_ VERSION - The mimalloc version we are API- and ABI-compatible with, in mimalloc’s
encoding (major·10⁴ + minor·10² + patch): v2.4.5.
mi_version()reports this. - VERSION
- Our own semantic version, from the crate manifest.
Functions§
- version
- mimalloc-encoded compat version, as reported by the C ABI
mi_version().