Parent: #62
Follow-up to rejected #78.
Evidence
Compile-time Heap.cellAllocationBytes values on current main:
- object: 656 bytes (624-byte payload + 32-byte header)
- function: 288 bytes
- generator: 264 bytes
- environment: 248 bytes
- promise: 192 bytes
- iterator helper / module namespace: 112 bytes
- bound function: 64 bytes
The current slab classes are 64, 128, 256, 512, 1024, 2048, so ordinary objects alone cross the 512-byte boundary and consume a 1024-byte slot: 368 bytes / 35.9% internal waste per object. #78 added a 768-byte seventh class and regressed object_churn about 9.8%, consistent with adding another linear classification/ownership bucket to every hot path.
Proposed slice
- replace the existing 1024-byte class with an exact 656-byte object class instead of adding a bucket;
- keep the bucket count and classification depth unchanged;
- retain the large-chunk policy for the 656-byte object class;
- derive the regression test from
Heap.cellAllocationBytes(Object) so layout drift fails visibly;
- update allocator docs that name the large object classes;
- preserve fallback/delegation, ownership indexes, free-list reuse, trimming, bulk teardown, heap caps, and parallel locking.
Acceptance
- compile-time proof still shows every managed cell maps to owned slab storage;
- focused GC backing/nursery tests pass with zero leaks;
- GC profile confirms ordinary cells use the 656-byte class with fewer/equal chunks and correct live/free accounting;
- seven alternating current-main/candidate process pairs preserve the exact
object_churn checksum and show a meaningful median win;
- only then run the batched full suite/harness and land a small conventional commit.
Parent: #62
Follow-up to rejected #78.
Evidence
Compile-time
Heap.cellAllocationBytesvalues on currentmain:The current slab classes are
64, 128, 256, 512, 1024, 2048, so ordinary objects alone cross the 512-byte boundary and consume a 1024-byte slot: 368 bytes / 35.9% internal waste per object. #78 added a 768-byte seventh class and regressedobject_churnabout 9.8%, consistent with adding another linear classification/ownership bucket to every hot path.Proposed slice
Heap.cellAllocationBytes(Object)so layout drift fails visibly;Acceptance
object_churnchecksum and show a meaningful median win;