Consumer: zig-utils/zig-js#403
Heap snapshots need a process-unique cell identifier that survives moving compaction. zig-gc already memcpy-copies the complete header during relocation, so identity belongs in collector metadata rather than an embedder pointer map that would go stale.
Scope
- Add a process-unique nonzero
StableCellIdto every published cell header. - Preserve the ID automatically across relocation and never recycle it during the process lifetime.
- Expose a read-only quiescent
cellMetadata/stable-ID query without exposing mutable headers. - Cover single and batch allocation, independent heaps, unknown pointers, reclamation/address reuse, and compaction.
- Keep allocation publication race-free and document the quiescent query contract.
- Run focused Debug/ReleaseSafe collector evidence.
- Close on green CI.