pub struct FrameArena { /* private fields */ }Expand description
The STATE-owned backing storage for every process::ActivationRecord
this crate hands out (ledger ST-103, ST-104, ST-110). Exactly three flat
Vecs, one per ArenaRange-typed field an ActivationRecord can embed —
see this module’s doc comment for why there are exactly three and not,
say, one shared buffer.
Implementations§
Source§impl FrameArena
impl FrameArena
pub fn new() -> Self
Sourcepub fn alloc_frame_words(&mut self, n: u32) -> ArenaRange
pub fn alloc_frame_words(&mut self, n: u32) -> ArenaRange
Bump-allocates n new frame words, returning the shared start offset
as an ArenaRange — the backing storage for one activation’s
ActivationRecord.frame. n == 0 is a legal no-op that still returns
a well-defined (empty) range at the current length, matching
Arena::alloc_inline_words’ own zero-is-a-no-op contract.
Sourcepub fn alloc_edge_terms(
&mut self,
terms: &[(EdgeKind, StateCellId, Option<PredicateFn>)],
) -> ArenaRange
pub fn alloc_edge_terms( &mut self, terms: &[(EdgeKind, StateCellId, Option<PredicateFn>)], ) -> ArenaRange
Bump-allocates a copy of terms into the edge-term table, returning
the shared start offset as an ArenaRange — the backing storage for
WaitSpecStorage::EdgeList. The concrete StateCellIds for a given
suspend point are fixed once elaboration resolves the instance’s
signals and never change for the life of the run, so this table is a
read-only lookup once written, never a rollback hazard (see this
module’s doc comment / WaitSpecStorage::EdgeList’s own doc comment).
Sourcepub fn alloc_fork_children(&mut self, n: u32) -> ArenaRange
pub fn alloc_fork_children(&mut self, n: u32) -> ArenaRange
Bump-allocates n reserved fork-child slots, returning the shared
start offset as an ArenaRange — the backing storage for
ForkFrame::children. Reserved, not populated: per Resolved design
decision D1 (docs/CONTRACTS.md), concrete child ProcessIds are
assigned dynamically by the scheduler as children are actually
spawned, so this only reserves the range; the placeholder 0 values
written here are overwritten by the caller once each child’s real
ProcessId is known.