sefer-alloc 0.1.0

A safe-by-construction, 100% Rust memory toolkit (no C/C++ libraries — no libnuma/mimalloc/jemalloc/snmalloc/tcmalloc): a single-threaded handle store (Region<T>) and a drop-in #[global_allocator] (SeferMalloc) over one verified segment substrate, with #![forbid(unsafe_code)] at the top.
Documentation
//! Phase 12.2 — the global heap registry (§2.1 of
//! `MALLOC_PLAN_PHASE12-13.md`): a self-hosting slot table of heaps, gated
//! behind `alloc-global` (it becomes the substrate of `SeferMalloc` in 12.3).
//!
//! The registry is the keystone inversion of Phase 12: heaps become SLOTS in
//! a global, self-hosting table (the `Region` slot-table discipline, reflected
//! one level deeper — the heap pool itself becomes a slot table). A thread
//! does NOT own its heap; it caches a raw `*mut HeapCore` to a registry slot
//! in TLS (12.3). Thread exit does not drop the heap; it abandons its
//! segments back to the registry (12.3/12.4) and recycles the slot.
//!
//! ## `#[doc(hidden)]` — not public API
//!
//! The registry module is `pub` only so integration tests in `tests/` can
//! exercise it before 12.3 wires it into `SeferMalloc`. It is NOT part of the
//! crate's supported public surface; every item is `#[doc(hidden)]` and may
//! change in any Phase 12.x sub-commit. Once 12.3 caches the registry pointer
//! inside the TLS binding, the test-only pub surface here shrinks (or moves
//! behind a `registry-test` dev-feature).
//!
//! ## Re-exports only
//!
//! Per the one-export-per-file rule, no logic lives here. The files:
//!
//! - [`tagged_ptr`] — the packed `(value | tag)` ABA-defence word.
//! - [`heap_core`] — the thin, slot-resident heap value (`HeapCore`).
//! - [`heap_slot`] — one slot (`HeapSlot`): state / generation / heap / link.
//! - [`bootstrap`] — the process-global `Registry` + atomic state-machine.
//! - [`heap_registry`] — the claim/recycle/abandon API.
//!
//! [`tagged_ptr`]: self::tagged_ptr
//! [`heap_core`]: self::heap_core
//! [`heap_slot`]: self::heap_slot
//! [`bootstrap`]: self::bootstrap
//! [`heap_registry`]: self::heap_registry

#[doc(hidden)]
pub mod bootstrap;
#[doc(hidden)]
pub mod heap_core;
#[doc(hidden)]
pub mod heap_registry;
#[doc(hidden)]
pub mod heap_slot;
mod tagged_ptr;
#[cfg(all(feature = "alloc-global", feature = "fastbin"))]
pub(crate) mod tcache;

#[doc(hidden)]
pub use heap_core::HeapCore;
#[doc(hidden)]
pub use heap_registry::HeapRegistry;
#[doc(hidden)]
pub use heap_slot::HeapSlot;