Expand description
A bounded block of this task’s own memory, as a byte slice.
AllocMem (syscall 6) maps fresh pages into the calling task and returns their address, and an
address is all it returns: turning it into something a service can read and write needs unsafe,
which no service may hold (CLAUDE.md 18.2). This module is that one step, audited once here, so that a
service which needs a working set too large for its stack - the supervisor holding an image it read from
disk before starting it - can have one without a heap and without unsafe of its own.
It is not an allocator. There is no free: the kernel reclaims a task’s memory only when the task
dies (CLAUDE.md 10.5), so a region is asked for once and reused, and its size is the bound, stated where
it is asked for (26.6.1). A caller that asks for one per operation leaks one per operation, until its
contract’s memory limit refuses the next (AllocError::Denied), which is loud rather than silent.
Structs§
- Region
- A run of pages
AllocMemmapped for this task, readable and writable, owned by this value.
Constants§
- PAGE
- The page size
AllocMemmaps in.