code wiki / _hdl_build / nx_galx_fill.nx

nx_galx_fill.nx

buildroot/runtime/_hdl_build/nx_galx_fill.nx

3778 B67 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic galx
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_galx_fill.nx

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

main f_atoi sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close fp sys_write sys_exit fn sys_mmap ↻ sys_write ↻ f_itoa sys_mmap ↻ sys_fork sys_execve sys_wait4

structs

none

consts

9const DRIVER: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/_hdl_build/_galx_prod_ingest.elf" as *u8
14const BATCH_DEFAULT: i64 = 500

functions

16func fp(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 calls 1: sys_write
17func 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 }
called by 1: main calls 2: sys_mmapsys_write
18func 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
19func 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 }
called by 1: main calls 1: sys_mmap
21func main(argc: i64, argv: *i64) -> i64