* getrusage on DEC OSF1 V1.3
@ 1994-12-21 17:45 David BREMNER
1994-12-21 18:44 ` Jeffrey Mogul
0 siblings, 1 reply; 4+ messages in thread
From: David BREMNER @ 1994-12-21 17:45 UTC (permalink / raw)
Can anyone clue me as to why the following program, which prints
something reasonable on suns running SunOs 4.1.3 and SGI's running
Irix 5.2, prints 0 on OSF1 V1.3 on a DEC AXP?
I realize the working set size is usually an estimate, but always
returning zero seems a little weak :-)
Is this a well known "feature", or am I doing something wrong?
/* Snip here */
#include <stdio.h>
#include <sys/time.h>
#include <sys/resource.h>
#define ARRAY_SIZE (1048576L/sizeof(int))
#define TRIALS 1000000L
main()
{
int random();
struct rusage rusage;
int arr[ARRAY_SIZE];
int t;
for (t=0; t< TRIALS; t++)
{
arr[random() % ARRAY_SIZE]++;
}
if(getrusage(RUSAGE_SELF,&rusage)==-1)
{
perror("getrusage");
exit(1);
}
printf("Max Working set = %ld\n",rusage.ru_maxrss);
}
--
bremner@cs.mcgill.ca
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: getrusage on DEC OSF1 V1.3
1994-12-21 17:45 getrusage on DEC OSF1 V1.3 David BREMNER
@ 1994-12-21 18:44 ` Jeffrey Mogul
1995-01-02 22:46 ` Andreas Stolcke
0 siblings, 1 reply; 4+ messages in thread
From: Jeffrey Mogul @ 1994-12-21 18:44 UTC (permalink / raw)
In article <3d9pk2$e8l@homer.cs.mcgill.ca> bremner@cs.mcgill.ca (David BREMNER) writes:
>Can anyone clue me as to why the following program, which prints
>something reasonable on suns running SunOs 4.1.3 and SGI's running
>Irix 5.2, prints 0 on OSF1 V1.3 on a DEC AXP?
On OSF/1 V2.0 and V3.0, it prints a non-zero value.
>I realize the working set size is usually an estimate, but always
>returning zero seems a little weak :-)
>
>Is this a well known "feature", or am I doing something wrong?
I think what you are "doing wrong" is running an old version of
the operating system. V1.3 certainly had bugs that were fixed
in 2.0 or 3.0.
By the way, if you want to see if something has been fixed in
the latest release, try it on our "test-drive" systems (see
http://www.digital.com/info/alpha-demo.html for details).
-Jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: getrusage on DEC OSF1 V1.3
1994-12-21 18:44 ` Jeffrey Mogul
@ 1995-01-02 22:46 ` Andreas Stolcke
1995-01-04 2:55 ` Jeffrey Mogul
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Stolcke @ 1995-01-02 22:46 UTC (permalink / raw)
In article <3d9t2b$obu$1@usenet.pa.dec.com>,
Jeffrey Mogul <mogul@pa.dec.com> wrote:
>In article <3d9pk2$e8l@homer.cs.mcgill.ca> bremner@cs.mcgill.ca (David BREMNER) writes:
>>Can anyone clue me as to why the following program, which prints
>>something reasonable on suns running SunOs 4.1.3 and SGI's running
>>Irix 5.2, prints 0 on OSF1 V1.3 on a DEC AXP?
>
>On OSF/1 V2.0 and V3.0, it prints a non-zero value.
>
>>I realize the working set size is usually an estimate, but always
>>returning zero seems a little weak :-)
>>
>>Is this a well known "feature", or am I doing something wrong?
>
>I think what you are "doing wrong" is running an old version of
>the operating system. V1.3 certainly had bugs that were fixed
>in 2.0 or 3.0.
>
However, even on a 2.0 system, I see the following buggy behavior
in /bin/csh:
21% limit mem
memoryuse 90912 kbytes
22% limit mem 10000k
23% limit mem
memoryuse 0 kbytes
(The limit command on other limit types works fine.)
I observed the same problem at the C level: as soon as one tries to set
the RSS to anything, it in fact is returned as "0" in later getrlimit
calls (although programs still run, so this can't be the true limit).
--
Andreas Stolcke stolcke@icsi.berkeley.edu
International Computer Science Institute stolcke@ucbicsi.bitnet
1947 Center St., Suite 600, Berkeley, CA 94704 (510) 642-4274 ext. 126
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: getrusage on DEC OSF1 V1.3
1995-01-02 22:46 ` Andreas Stolcke
@ 1995-01-04 2:55 ` Jeffrey Mogul
0 siblings, 0 replies; 4+ messages in thread
From: Jeffrey Mogul @ 1995-01-04 2:55 UTC (permalink / raw)
In article <3e9vof$748@agate.berkeley.edu> stolcke@icsi.Berkeley.EDU (Andreas Stolcke) writes:
>However, even on a 2.0 system, I see the following buggy behavior
>in /bin/csh:
>
>21% limit mem
>memoryuse 90912 kbytes
>22% limit mem 10000k
>23% limit mem
>memoryuse 0 kbytes
>
>(The limit command on other limit types works fine.)
Seems to be fixed in V3.0:
% limit mem
memoryuse 123272 kbytes
% limit mem 10000k
% limit mem
memoryuse 10000 kbytes
%
-Jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1995-01-04 2:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-12-21 17:45 getrusage on DEC OSF1 V1.3 David BREMNER
1994-12-21 18:44 ` Jeffrey Mogul
1995-01-02 22:46 ` Andreas Stolcke
1995-01-04 2:55 ` Jeffrey Mogul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox