Article View: comp.sys.dec
Article #5495Process data limit
From: beihl
Date: Wed, 03 Jan 1990 13:39
Date: Wed, 03 Jan 1990 13:39
31 lines
1172 bytes
1172 bytes
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 <sys/time.h>
#include <sys/resource.h>
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)
Technical Details
Message-ID:
<5040@cadillac.CAD.MCC.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!samsung!cs.utexas.edu!milano!cadillac!sunburn!beihlShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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