Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: beihl@sunburn
Subject: Process data limit
Date: 3 Jan 90 13:39:02 GMT	[thread overview]
Message-ID: <5040@cadillac.CAD.MCC.COM> (raw)


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)


             reply	other threads:[~1990-01-03 13:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1990-01-03 13:39 beihl [this message]
1990-01-04  2:50 ` Process data limit George Robbins
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox