From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,34750a623d70f4d4 X-Google-Attributes: gidfee84,public From: patchkov@acs1.acs.ucalgary.ca (Serguei Patchkovskii) Subject: Re: memory limits Date: 2000/02/09 Message-ID: <87sd39$ojg$2@nserve1.acs.ucalgary.ca>#1/1 X-Deja-AN: 583770453 References: <38A01DEB.B957E36A@mimosa.ceng.cea.fr> X-Complaints-To: news@ucalgary.ca X-Trace: nserve1.acs.ucalgary.ca 950122409 25200 136.159.34.221 (9 Feb 2000 18:53:29 GMT) Organization: University of Calgary NNTP-Posting-Date: 9 Feb 2000 18:53:29 GMT Newsgroups: comp.unix.osf.osf1 Philippe Blaise (phblai@mimosa.ceng.cea.fr) wrote: : I thought it was not possible to adress more than : memoryuse 1032192 kbytes : but a simple program can allocate more : I believe that csh 'memoryuse' limit corresponds to RLIMIT_RSS in getrlimit/setrlimit system calls. Now, looking at the manual page for setrlimit(2), we see: RLIMIT_RSS [Digital] The maximum size, in bytes, to which a process's resident set size can grow. This value imposes a limit on the amount of physical memory to be given to a process. If memory is in short supply, the system prefers to take memory from processes that are exceeding their declared resident set size. As you can see, this limit applies only in constrained memory situations, and controls the amount of physical memory your process can use - provided that there are other ways in which it can be used by the system. Therefore, calling RLIMIT_RSS a "limit" is a bit of misnomer - your process may well be able to use more memory (if system has no other use for it), or it may be stuck with less memory (if there are higher-priority uses for that memory). I'd rather call RLIMIT_RSS a hint, made by your application to the virtual memory subsystem, saying that you'd *like* to have that much real memory to work optimally ... Cheers, /Serge.P P.S. RTFM - it usually helps! -- home page: http://www.cobalt.chem.ucalgary.ca/ps/