From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,d8b3f061fbfd2ec8,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-09-20 01:24:58 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!math.ohio-state.edu!cs.utexas.edu!pirates.cs.swt.edu!pirates.cs.swt.edu!peng From: peng@pirates.cs.swt.edu (Wuxu Peng) Newsgroups: comp.unix.osf.osf1 Subject: Memory allocation Date: 19 Sep 1994 15:27:54 GMT Organization: Computer Science Department, Southwest Texas State University Message-ID: <35kalq$m03@pirates.cs.swt.edu> NNTP-Posting-Host: pirates.cs.swt.edu X-Newsreader: TIN [version 1.2 PL2] Machine: DEC Alpha 3000/300, OSF2.0 (rev.250). Problems: Too much swapping space allocated. The program is memory intensive. Since UNIX (or just OSF?) does not immediately return space freed by "free" to system (it claims new swapping space, not reuses those freed space), I have to maintain a pool of free nodes. My program will first examine if the free pool is empty, and will only do "malloc" when the pool is empty. The main body of my program is a loop. It may loop from 1 to 100 times, depending upon some command-line parameter. The problem is that, every iteration of that loop demands more swapping space. This happens even if the program does not do any new "malloc". Each iteration requires new swapping space, pure and simple. As a result, for some input, my program eventually exhausts the entire 128M swapping space. Any way getting around this problem? Thanks. -- --wuxu peng (peng@pirates.cs.swt.edu)