Skip to main content

Module gc

Module gc 

Source
Expand description

GC heap abstraction wrapping the RC-backed object slab. GC compatibility layer — thin wrapper over ObjectSlab.

The mark-sweep garbage collector has been removed. This module preserves the GcRef and GcHeap API for backward compatibility, but all allocation is now backed by deterministic reference counting via ObjectSlab.

§What changed

  • GcHeap::alloc() → delegates to ObjectSlab::alloc() (RC-backed)
  • GcHeap::collect() → no-op (RC handles deallocation)
  • GcHeap::mark() / sweep() → removed (no mark-sweep semantics)
  • GcHeap::get() → delegates to ObjectSlab::get()
  • GcHeap::live_count() → delegates to ObjectSlab::live_count()

§Determinism

The ObjectSlab provides deterministic LIFO slot reuse. Same allocation sequence → same slot indices. No stop-the-world pauses.

Structs§

GcHeap
Backward-compatible GC heap interface backed by ObjectSlab.
GcRef
A handle into the GC heap. Lightweight, copyable index.