# # compile on Plan9 # mk # # compile on UNIX (plan9port is required) # 9c -DUNIX 9xa.c && 9l -o 9xa 9xa.o # # Note on ARG_MAX (merely my memo. ARG_MAX is not used) # # Mac/OSX /usr/include/sys/syslimits.h #define ARG_MAX (256 * 1024) /* max bytes for an exec function */ # 9vx /usr/local/9vx-0.12/sys/include/ape/sys/limits.h: define ARG_MAX 16384 # Plan9 we can know the upper limit from TSTKSIZ (thanks Charles Forsyth) cpu% cd /sys/src/9 cpu% grep TSTKSIZ */*.h */*/*.h alphapc/mem.h:#define USTKTOP (TSTKTOP-TSTKSIZ*BY2PG) /* byte just beyond user stack */ alphapc/mem.h:#define TSTKSIZ 100 bitsy/mem.h:#define TSTKSIZ 100 kw/mem.h:#define TSTKSIZ 256 mtx/mem.h:#define USTKTOP (TSTKTOP-TSTKSIZ*BY2PG) /* byte just beyond user stack */ mtx/mem.h:#define TSTKSIZ 100 omap/mem.h:#define TSTKSIZ 256 pc/mem.h:#define TSTKSIZ 100 /* pages in new stack; limits exec args */ ppc/mem.h:#define USTKTOP (TSTKTOP-TSTKSIZ*BY2PG) /* byte just beyond user stack */ ppc/mem.h:#define TSTKSIZ 100 grep: can't open */*/*.h: '*' file does not exist cpu% the unit of TSTKSIZ is page(4KB)