code wiki / (root) / nx_arena_reset_probe.nx

nx_arena_reset_probe.nx

buildroot/runtime/nx_arena_reset_probe.nx

4219 B84 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind probetopic arena
docsdependenciesstructsconstsfunctions

about

nx_arena_reset_probe.nx -- bite-proof that sys_arena_mark/sys_arena_reset ACTUALLY RECLAIM memory (not merely run). MEASURED, not asserted: read this process's own VmRSS from /proc/self/status at three points -- after warmup+mark, after allocating many small chunks (RSS must RISE), and after reset+re-churn (RSS must NOT double). A reset that returns 1 but frees nothing is the exact failure this catches. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_arena_reset_probe.nx

imports: nx_syscalls.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr 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 ↻ gv_head gv_puts sys_write ↻ sys_arena_mark sys_mmap ↻ ap_vmrss sys_openat_rd sys_mmap ↻ sys_read sys_close ap_churn sys_mmap ↻ sys_arena_reset gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_check gv_puts ↻ gv_verdict gv_note_bare_rate gv_bare_rate

structs

none

consts

8const K_MAGIC_8192: i64 = 8192
9const K_MAGIC_8191: i64 = 8191
10const K_MAGIC_1024: i64 = 1024
11const K_MAGIC_16000: i64 = 16000
12const K_MAGIC_48000: i64 = 48000

functions

14func ap_vmrss() -> i64
41func ap_churn(nbytes_total: i64) -> i64
called by 1: main calls 1: sys_mmap
56func main() -> i64