Skip to main content

Module object_slab

Module object_slab 

Source
Expand description

RC-backed object slab for class instances (replaces mark-sweep GC). Object Slab — deterministic RC-backed replacement for mark-sweep GC.

Provides indexed allocation of type-erased objects. Objects are ref-counted (via Rc<RefCell<Box<dyn Any>>>) so they are freed deterministically when no references remain. Freed slots are reused in LIFO order for deterministic placement.

§Determinism guarantees

  • Same allocation sequence produces same slot indices.
  • Slot reuse is LIFO (last freed = first reused).
  • No stop-the-world pauses.
  • No OS memory return during normal execution (slots are recycled).

Structs§

ObjectSlab
A deterministic slab allocator for type-erased objects.
SlabRef
A handle into the object slab. Lightweight, copyable index.