code wiki / (root) / nx_scratch_gate.nx

nx_scratch_gate.nx

buildroot/runtime/nx_scratch_gate.nx

5581 B122 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic scratch
docsdependenciesstructsconstsfunctions

about

nx_scratch_gate.nx -- proves the sovereign scratch arena on the resource it exists to protect. Every tooth is designed so that a BROKEN arena fails it. T1 and T6 are a matched pair: T6 runs the OLD idiom in this same process and REQUIRES it to grow, so if T1 reports "no growth" we know that is the arena working and not the instrument being blind. A gate that cannot see the defect cannot certify the fix. nx_scratch_gate -- 6 teeth, exit 0 = GREEN license_tier: ORIGINAL layer: gate module: nishi-core.gate.scratch

dependencies 1 imports · 0 importers

nx_scratch.nx nx_scratch_gate.nx

imports: nx_scratch.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main nxs_init sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sg_statm sg_p nxs_reset nxs_alloc nxs_init ↻ sys_mmap ↻ sg_n nxs_overflows nxs_hwm nxs_cap_bytes

structs

none

consts

12const SG_ITERS: i64 = 5000

functions

17func sg_p(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main
18func sg_n(v: i64) -> i64
called by 1: main
28func sg_statm(buf: *u8) -> i64
called by 1: main
44func main(argc: i64, argv: *i64) -> i64