code wiki / _hdl_build / nx_mrds_probe_b.nx
nx_mrds_probe_b.nx source
↩ module page · 10 lines · 718 B
1// nx_mrds_probe_b.nx -- deadshadow NEGATIVE control: subset-variant g_pn, NO lib import.
2// deadshadow mode must SKIP this file (nothing shadows the local). license_tier: ORIGINAL
3import "nx_syscalls.nx"
4import "nx_itoa_lib.nx" // shared MSB-first emitter (zero-alloc)
5// MIGRATED to the shared emitter (debt 1785563586). The old body mmapped a scratch buffer
6// per call and never freed it. At PAGE granularity that is 4096B leaked PER CALL -- the
7// defect that took 28.5GB of a 36GB host in nx_ts_lumadiff (2MB input, ~3.66M calls).
8// nxi_* is MSB-first, allocates NOTHING, and emits identical bytes including the sign.
9func g_pn(v: i64) -> i64 { nxi_out(v); return 0 }
10func main() -> i64 { g_pn(9); return 0 }