FA-90445 / Garbage collector invariants / Member archive
Sliding compaction: new addresses assigned in input order · case 05
Objects are permuted instead of slid, so live objects can overtake each other.
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 |
|---|---|---|---|
| pointer to an object start | {"layout": [[116, 148, [100]], [100, 160, []]], "roots": [116, 100], "top": 128} | {"layout": [[100, 148, [112]], [112, 160, []]], "roots": [100, 112], "top": 128} | 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 ↗