Parent: #1024
Reproduction
Using zig-gc main at 0285ef8:
zig build test -Dtest-filter='Promise fits the 256-byte GC slab' -j1fails deterministically on exact parent 022ceb1 and on the #1024 candidate:
expected 256, found 264Current zig-gc defines cellAllocationBytes(T) as its 16-byte aligned header stride plus sizeof(T). Promise is 248 bytes, so its exact cell allocation is 264 bytes. GcCellBacking classifies that total into the next owned bucket: 512 bytes rather than the intended 256-byte class.
Scope
- Recover at least eight payload bytes so Promise plus its collector header fits the 256-byte owned slab, while preserving tracing, relocation, rejection tracking, reaction publication, and thread safety; or explicitly rebaseline the 512-byte class with measured memory/throughput evidence.
- Keep the allocation-class assertion. Do not fix this by deleting or weakening the test.
- Verify the Promise, GC relocation, rejection-tracker, async, no-GIL, and TSan gates.