FA-90652 / Garbage collector invariants / Member archive
Collection set: selection skips over regions that do not fit · case 02
Cheaper, less profitable regions are packed in after a better region was rejected.
Case contract
Regions are [id, kind, used, live]. All young regions are always collected (their live bytes cost live * cost). Old regions whose liveness is strictly below live_pct percent (live * 100 < pct * used) are candidates; humongous regions never are. Candidates are ordered by reclaimable bytes (used - live) descending, ties by id, and added while the accumulated cost stays within budget; selection stops at the first candidate that does not fit. Return the collection set, its cost and reclaimed bytes.
Why this case matters
Region-based collectors meet pause goals by choosing the collection set against a cost budget.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| expensive region first stops selection | {"cset": [1, 2, 7, 3], "reclaimed": 335, "time": 65} | {"cset": [1, 2], "reclaimed": 160, "time": 40} | 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 ↗