Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!samsung!cs.utexas.edu!milano!cadillac!sunburn!beihl From: beihl@sunburn Newsgroups: comp.sys.dec Subject: Process data limit Message-ID: <5040@cadillac.CAD.MCC.COM> Date: 3 Jan 90 13:39:02 GMT Sender: news@cadillac.CAD.MCC.COM Reply-To: beihl@sunburn () Organization: MCC VLSI-CAD Program, Austin, TX Lines: 31 Can anyone explain the following? Sbrk() seems to be returning a value far larger than getrlimit or `limit` (from the shell). Who's right? I've looked at the man pages for getrlimit, csh and sbrk and am still clueless... % cat > test.c #include #include extern int etext; main() { struct rlimit rlimit_ptr; printf("sbrk(0): 0x%x\n",sbrk(0)); getrlimit(RLIMIT_DATA,&rlimit_ptr); printf("rlimit: 0x%x\n",(unsigned int)&etext + rlimit_ptr.rlim_max); } ^D % cc test.c % a.out sbrk(0): 0x10001460 rlimit: 0x57fbe10 % limit cputime unlimited filesize unlimited datasize 85988 kbytes stacksize 512 kbytes coredumpsize unlimited memoryuse 12748 kbytes % Gary Beihl (beihl@mcc.com)