FA-90678 / Garbage collector invariants / Member archive
Mark parity: live objects marked with the previous epoch's parity · case 03
Every object reported live is swept as dead.
Case contract
Mark bits flip meaning every cycle: an object is live when its mark equals epoch % 2. Initially every object has mark 0 at epoch 0. gc live_ids: finish sweeping every unswept page, advance the epoch, set the mark of each listed live object to the new parity, and mark all pages unswept. alloc id page: sweep the page first if it is unswept, then create the object with the current parity. finish sweeps the remaining pages. Sweeping a page removes objects whose mark differs from the current parity and logs [page, removed]. Return the sweep log and surviving objects per page.
Why this case matters
Flipping mark polarity avoids clearing mark bits but makes sweep ordering and allocation colour critical.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: lazy sweep before allocation | {"log": [[1, ["a3", "b3", "c3"]], [2, ["d3", "e3"]]], "pages": {"1": ["x3"], "2": []}} | {"log": [[1, ["b3", "c3"]], [2, ["e3"]]], "pages": {"1": ["a3", "x3"], "2": ["d3"]}} | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗