FA-90430 / Garbage collector invariants / Member archive
Cheney copy: exactly filling to-space reported as overflow · case 05
A heap whose survivors fit to-space exactly fails with out-of-memory.
Case contract
Breadth-first semispace copying. heap maps from-space address -> {size, fields}. Roots are copied in order, then a scan pointer walks to-space copying each referenced object exactly once (forwarding addresses are reused) and rewriting fields to to-space addresses. Copies are bump-allocated from base with sizes rounded up to 8 bytes; if a copy would end beyond limit, return ["out-of-memory", copies so far]. Return new roots, the to-space layout [new, old, fields] and the final free pointer.
Why this case matters
Copying collectors rely on forwarding pointers and the scan/free invariant to preserve sharing.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| to-space exactly full | ["out-of-memory", 3] | {"free": 1072, "layout": [[1000, 400, [1024]], [1024, 200, [1048]], [1048, 300, [1056, null]], [1056, 100, [1024, 1048]]], "roots": [1000]} | 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 ↗