1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! Phase 12.2 — the global heap registry (§2.1 of
//! `ALLOC_PLAN_PHASE12-13.md`): a self-hosting slot table of heaps, gated
//! behind `alloc-global` (it becomes the substrate of `SeferAlloc` 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 `SeferAlloc`. 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
pub
pub use HeapCore;
pub use HeapRegistry;
pub use HeapSlot;