ReviewOS

zig-utils/zig-js

GC: implement multi-age generations and parallel mid-script minor collection

#145
Closed chris opened this 9 days ago ·
9 days ago

Parent: #134 Depends on: #144 Related: #1 and #97

Advance the one-cycle nursery into a production generational collector.

Acceptance:

  • Implement multiple young ages with measured promotion/tenuring policy and adaptive nursery sizing.
  • Maintain remembered sets across interpreter, JIT, C/Objective-C bridges, workers, host callbacks, and external buffers.
  • Allow parallel minor collection at mid-script safepoints with bounded mutator coordination.
  • Preserve weak references, finalizers, promises, jobs, handles, and exception state.
  • Add long-running mutation, pause-time, throughput, leak, fault-injection, and TSan evidence.
  • Document invariants and tuning data from committed benchmark artifacts.

Child issue map

  • #363 — multi-age survivor policy, persistent cards, and exact telemetry
  • #364 — repeated multi-age no-GIL minor rendezvous
  • #365 — alternating policy benchmarks, trigger tuning, and terminal evidence

#363 keeps collection at admitted safe boundaries; #364 proves the existing bounded cooperative rendezvous across multiple ages; #365 owns policy selection, production trigger tuning, committed benchmark artifacts, and closure evidence.

9 days ago

The multi-age core and repeated no-GIL rendezvous slices are complete on main: #363 and #364 are closed. #365 is now the sole terminal child and owns alternating age/threshold evidence, production trigger tuning, long stress/fault/leak/sanitizer gates, generated publication, and any narrower follow-up exposed by that matrix.

9 days ago

#365 is complete. Age three is justified by 112 accepted samples: 0.96–1.01x single-mutator throughput versus age one, <=1.21% RSD, 0.391 ms max shared pause, and 2,781 parks with zero timeouts. Strong/weak/finalization, fault, long soak, Debug, ReleaseSafe, leak, and focused TSan gates pass. The release matrix now marks moving and generational GC green.

Sign in to comment on this issue.