FAILURE MAP
← Case archive

FA-90492 / Garbage collector invariants / Member archive

Heap pacing: tiny live heaps get tiny goals · case 02

After a collection that leaves little live data, the next collections run after a few bytes.

Member previewVariant 2 · 3 implementations · 7 checks per implementation

Case contract

GOGC-style pacing starting at 100 percent with goal = min_heap. alloc b adds b to the heap and to live bytes and triggers a collection when collection is enabled (percentage >= 0) and heap >= goal: the heap shrinks to the live bytes, which become the marked size, and goal = max(marked + marked * pct // 100, min_heap). drop b turns b live bytes into garbage. setgc p changes the percentage (-1 disables) and, unless disabled, recomputes the goal from the last marked size. Return the heap sizes at which collections triggered, the final goal and heap.

Why this case matters

Collector pacing decides when collections run; off-by-one or base errors change memory footprint.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
small live heap uses the minimum goal{"gcs": [120, 240, 6, 120], "goal": 240, "heap": 120}{"gcs": [120, 240, 120], "goal": 240, "heap": 120}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 ↗