code wiki / _hdl_build / nx_galx_fill.nx
nx_galx_fill.nx
buildroot/runtime/_hdl_build/nx_galx_fill.nx
about
nx_galx_fill.nx -- SOVEREIGN Nishi corpus-fill batch-runner. Replaces the bash split/cp/awk loop:
counts the lines in knowledge/status/galx_corpus_full.txt, then for s = start; s < total; s += BATCH:
fork() + execve(_galx_prod_ingest.elf, [s, BATCH]) + wait4(). Each ingest slice runs in a FRESH
process, so the kernel reclaims all of its mmaps on exit -> RSS stays bounded (~3GB/slice) with NO
sys_munmap (which the toolchain lacks). All logic is NishiLang; wsl is only the last-mile launcher.
Usage: nx_galx_fill <start_line> (resume offset; 0 = from the beginning). license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 9 | const DRIVER: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/_hdl_build/_galx_prod_ingest.elf" as *u8 |
| 14 | const BATCH_DEFAULT: i64 = 500 |
functions
| 16 | func fp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 17 | func fn(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1}; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1}; var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1}; sys_write(1,b,k); return 0 } |
| 18 | func f_atoi(s: *u8) -> i64 { var v: i64=0; var i: i64=0; while s[i]!=(0 as u8){ if s[i]>=(48 as u8){ if s[i]<=(57 as u8){ v=v*10+((s[i]-(48 as u8)) as i64) } } i=i+1 } return v } called by 1: main |
| 19 | func f_itoa(v: i64, buf: *u8) -> i64 { var m: i64=v; if m<0{m=0}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1}; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1}; var i: i64=0; while i<k{buf[i]=t[k-1-i];i=i+1}; buf[k]=0 as u8; return 0 } |
| 21 | func main(argc: i64, argv: *i64) -> i64 |