Goal
Publish a versioned, allocation-free Context memory snapshot whose non-overlapping ownership domains reconcile exactly, including shared-realm ownership and executable mappings, without presenting logical GC subsets as additional allocated bytes.
Scope
- Report current and peak Context-allocator backing from the opt-in runtime attribution profile.
- Report owned native live/retired mappings separately from shared mappings merely observed by a sibling realm.
- Expose heap logical live bytes, net issued GC-cell bytes, managed string/ArrayBuffer/object/generator/environment side-storage bytes, and Promise reaction entries as explicitly overlapping diagnostic subsets.
- Record whether this realm owns the precise heap and JIT owner; never double count shared storage.
- Preserve heap-budget data and identify allocator domains outside the reconciled subtotal, including collector auxiliary scratch and profiler/control allocations.
- Add a teardown checkpoint that proves every tracked owned domain returns to zero after finalizers, code retirement, and allocator wrapper destruction.
Acceptance
- Schema version and coverage flags make partial accounting fail visible.
- Checked arithmetic proves each published subtotal and net counter.
- Private arena, private precise-GC, budgeted, JIT, shared-realm, and teardown fixtures reconcile exact ownership without allocations in the snapshot path.
- Shared heap/code bytes appear once as owned and only as observed in sibling snapshots.
- The disabled production path allocates no profiling state and changes no hot counter path.
- Full unit, moving-GC, no-GIL/TSan, ABI, and code-retirement gates pass.
No-workaround rules
- No RSS estimate substituted for owned bytes, allocator capacity inferred from logical live cells, shared mapping counted per realm, saturating arithmetic hiding counter corruption, or opaque "other" bucket presented as complete accounting.