Skip to main content

godspeed/
memory.rs

1// SPDX-License-Identifier: Apache-2.0
2//! A bounded block of this program's own memory, for a working set too large for its stack.
3//!
4//! [`Region`] is the SDK's, re-exported so an ordinary program never names `godspeed_sdk`: the same type,
5//! not a wrapper. Ask for one ONCE and reuse it - there is no free, because the kernel reclaims a program's
6//! memory only when it ends (CLAUDE.md 10.5), so a region asked for per operation is one leaked per
7//! operation until the memory limit refuses. Most programs never need one: change the representation so
8//! the working set is small first (CLAUDE.md 26.6.1). The first user is the supervisor, holding a package's
9//! image while it checks and starts it.
10
11pub use godspeed_sdk::memory::Region;