Skip to main content

FrameArena

Struct FrameArena 

Source
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

Source

pub fn new() -> Self

Source

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.

Source

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).

Source

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.

Trait Implementations§

Source§

impl Default for FrameArena

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V