pub struct Region { /* private fields */ }Expand description
A run of FRESH pages this task was just given by AllocMem, for the §22 P7 stale-translation test.
P7 asks whether a dead task’s translations can outlive it (CLAUDE.md 10.5): a writer stamps its
pages, is killed, and a checker spawned after it, given the SAME virtual addresses (every task’s
AllocMem grows from one base), must read the zeroes the kernel filled its new pages with. A
pattern word there means the checker read through a translation that belonged to the dead writer.
Reading and writing that memory needs a raw pointer, which a test SERVICE must not hold (18.2), so
it is wrapped here. The wrapper is sound because a Region can only be made from a successful
AllocMem: its pages are mapped, writable, private to this task, and referenced by nothing else -
the kernel has just created them, and no Rust object lives there.