FA-90639 / Garbage collector invariants / Member archive
Adaptive tenuring: survivor space never filled exactly · case 04
An object that would fill the survivor space exactly is promoted instead.
Case contract
Survivors are [id, age, size] after a minor collection. desired = capacity * ratio // 100. Walking ages 1..max_threshold, accumulate sizes; the first age at which the running total exceeds desired becomes the tenuring threshold (max_threshold if never exceeded). Objects with age >= threshold are promoted; the rest are placed youngest first (ties by id) into the survivor space of the given capacity, and any that do not fit overflow into promotion. Return threshold, promoted ids, kept ids and bytes used.
Why this case matters
Tenuring policy controls premature promotion and survivor overflow in generational collectors.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| survivors fill the space exactly | {"kept": [1], "promoted": [2, 3], "threshold": 2, "used": 60} | {"kept": [1, 2], "promoted": [3], "threshold": 2, "used": 100} | 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 ↗