Skip to main content

CODE_BASE

Constant CODE_BASE 

pub const CODE_BASE: u32 = 0x0040_0000; // 4_194_304u32
Expand description

Guest virtual address where the code region is mapped read-only.

The canonical definition is the PVM2 ABI constant javm_cap::layout::CODE_BASE (re-exported here for transpiler call sites). Code occupies [CODE_BASE, DATA_BASE); data regions (stack/ro/rw/heap) occupy [DATA_BASE, 4 GiB) (see ProgramLayout). The linker asserts code stays below DATA_BASE and the data layout stays within the 4 GiB guest range. Guest virtual address where the (single) code region maps read-only. A PVM PC is CODE_BASE + byte_offset. Sits at 4 MiB so [0, 4 MiB) is an unmapped null guard.