code wiki / _hdl_build / test_munmap.nx

test_munmap.nx

buildroot/runtime/_hdl_build/test_munmap.nx

1084 B22 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind orphan librarytopic test
docsdependenciesstructsconstsfunctions

about

test_munmap.nx -- verify sys_munmap actually frees. 200k cycles of mmap(1MB)+touch+munmap = 200GB churned; if munmap frees, peak stays ~1MB and it completes; if munmap is a no-op, address space exhausts -> mmap returns <0 and we report failure. expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls.nx test_munmap.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

structs

none

consts

none

functions

5func p(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
6func pn(v: i64) -> i64
11func main() -> i64