Abfall tri-color heap with write barriers
Platform spec ADR
Abfall tri-color heap with write barriers
Spec standingStandard
- Contracts and edge cases MUST rules for allocation, barriers, roots, and Phase A mutator exclusivity.
- Design model Heap ownership, tri-color GC, Phase A mutator rules, and compiler/runtime split.
- Examples Allocation failures, GC pacing triggers, and external root pinning scenarios.
- FAQ and troubleshooting GC pauses, mutator violations, barrier omissions, and heap growth debugging.
- Flow and algorithm Allocation, barrier insertion, collection pacing, and safepoint algorithms.
- Verification and traceability Runtime GC tests, Abfall integration, and compiler stack-map obligations.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
| Section id | Required | Found |
|---|---|---|
what-this-feature-specifies | yes | yes |
implementation-anchors | yes | yes |
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
Context
Section titled “Context”The prior arena model needed a collector that supports concurrent marking and precise scanning with compiler-emitted descriptors.
Decision
Section titled “Decision”| Component | Role |
|---|---|
| Abfall | Tri-color mark/sweep heap integrated in beskid_runtime::gc |
| Barriers | gc_write_barrier on pointer stores during marking |
| STW | Limited stop-the-world for root scan and phase transitions |
| Snapshots | GcSnapshot / enter_runtime_scope for host tooling |
Git anchor: 6ecd493 (vendored Abfall + Beskid heap integration).
Consequences
Section titled “Consequences”Lowering must emit barriers where Phase requires them. Hosts attach runtime scope before JIT/AOT execution.
Verification anchors
Section titled “Verification anchors”compiler/crates/beskid_runtime/src/gc/; JIT runtime tests.