From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,6452456747b3f94c,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-09-05 14:22:08 PST Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!newsfeed.ACO.net!Austria.EU.net!EU.net!uunet!utcsri!sys.toronto.edu!jwang Newsgroups: comp.unix.osf.osf1 From: jwang@sys.toronto.edu (Jingwen Wang) Subject: resource limit question Message-ID: <1994Sep5.153743.3756@jarvis.cs.toronto.edu> Summary: RLIMIT_RSS is always set to 100 after setrlimit() Keywords: OSF1 2.0 Nntp-Posting-Host: pilot.sys.toronto.edu X-Newsreader: NN version 6.5.0 #6 (NOV) Date: 5 Sep 94 19:37:44 GMT It looks like the OSF memoryuse limit (RLIMIT_RSS) cannot be changed as documented by setrlimit(2). It always sets RLIMIT_RSS current (soft) limit to 100, no matter what value I specify. The following code: #include #include #include extern getrlimit(int, struct rlimit *); int main() { struct rlimit rl; rl.rlim_cur = 30000; rl.rlim_max = RLIM_INFINITY; if (setrlimit(RLIMIT_RSS, &rl) < 0) perror("setrlimit"); else printf("setrlimit RLIMIT_RSS ok\n"); if (getrlimit(RLIMIT_RSS, &rl) < 0) { perror("oops!\n");; exit(-1); } printf("RLIMIT_RSS: rl.rlim_cur=%lu rl.rlim_max=%lu\n", rl.rlim_cur, rl.rlim_max); exit(0); } I ran it as root and I always get: setrlimit RLIMIT_RSS ok RLIMIT_RSS: rl.rlim_cur=100 rl.rlim_max=9223372036854775807 Any ideas why rl.rlim_cur is not set to 30000? Thanks. Jingwen Wang Computer Systems Research Institute University of Toronto 6 Kings College Road Toronto, Ont., Canada M5S 1A1 E-mail: jwang@sys.toronto.edu Tel: (416)-978-1675