FA-90457 / Garbage collector invariants / Member archive
Free-list sweep: free blocks merged across live blocks · case 02
Coalesced free blocks swallow live objects that sit between them.
Case contract
blocks are [address, size, marked] covering the heap in any order. Sweep in address order: unmarked blocks become free and physically adjacent free blocks coalesce. Then serve requests first-fit in address order: round the request up to 8 bytes; split the chosen block when the remainder is at least 16 bytes (the allocation takes the low end), otherwise hand out the whole block; no fit yields None. Return the swept free list (as it was right after sweeping), the allocation addresses and the final free list.
Why this case matters
Sweepers and free-list allocators must keep block boundaries exact or they hand out overlapping memory.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: sweep, split and exhaust | {"alloc": [2064, 2088, 2112, 2152, null], "free": [], "swept": [[2064, 112]]} | {"alloc": [2064, 2088, 2120, 2160, null], "free": [], "swept": [[2064, 48], [2120, 64]]} | 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 ↗