FA-90437 / Garbage collector invariants / Member archive
Sliding compaction: dead objects still advance the compaction pointer · case 02
Live objects keep the gaps left by dead objects and the heap never shrinks.
Case contract
Mark-compact with sliding. objs are [start, size, fields] in arbitrary order; pointers (fields and roots) may point anywhere inside an object and belong to the object whose [start, start+size) contains them; a pointer outside every object is ["dangling-pointer", p]. Mark from the roots, assign new addresses to live objects in address order starting at base with no gaps, and relocate every pointer to new start + original offset. Return the new layout [new, old, fields], new roots and the new top.
Why this case matters
Sliding compaction must preserve address order and interior offsets while squeezing out dead space.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: interior pointers relocate with their object | {"layout": [[100, 100, [134, null]], [124, 124, [104]]], "roots": [100], "top": 176} | {"layout": [[100, 100, [126, null]], [116, 124, [104]]], "roots": [100], "top": 140} | 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 ↗