Skip to main content

SESSION_STACK_BYTES

Constant SESSION_STACK_BYTES 

Source
pub const SESSION_STACK_BYTES: usize = _; // 268_435_456usize
Expand description

The stack a tree-walker session runs on.

A LOGOS call costs the tree-walker a chain of Rust frames — statement, expression, call, and the statement inside it — so the depth every engine promises ([crate::semantics:: MAX_CALL_DEPTH], which the bytecode VM reaches on any thread because its frames live on the heap) needs far more stack than the 2 MiB an ordinary thread gets. The reservation is virtual: pages are committed only as deep recursion touches them.