From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,19771145c5594926 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2000-11-15 20:26:34 PST Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!news-xfer.nuri.net!news.nuri.net!not-for-mail From: "Park, Byoung-Kyu" Newsgroups: comp.unix.tru64 Subject: Re: Memory Management Date: Thu, 16 Nov 2000 13:25:54 +0900 Organization: Inet Internet Services Message-ID: <8uvnlp$8ek$1@news.nuri.net> References: <3A11AFE6.194B9261@virgin.net> NNTP-Posting-Host: 203.226.204.57 X-Trace: news.nuri.net 974348793 8660 203.226.204.57 (16 Nov 2000 04:26:33 GMT) X-Complaints-To: abuse@nuri.net NNTP-Posting-Date: 16 Nov 2000 04:26:33 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Xref: supernews.google.com comp.unix.tru64:840 Checking the swap area. => #swapon -s Program executing is memory load and allocation swap space. so, messages display that low swap space ex> recommand swap space = Physical memory * 2.5 or 3.0 "root" wrote in message news:3A11AFE6.194B9261@virgin.net... > This is a historic question. > > We upgraded from Tru64 3.2G to Tru64 4.0F some time ago. When we ran > our application on 4.0F we started getting "Low swap space" warnings > that we did not get under 3.2G. > > Looking at the VSIZE column of the 'ps' output I noticed that under 4.0F > memory allocated to a process is not released back to the operating > system - i.e. VSIZE only ever increases. Under 3.2G the > VSIZE fluctuates up and down. > > I wrote the following simple test C program: > > #include > #include > #define MB (1024*1024) > void main(void) > { > char *mem_block1; > char *mem_block2; > > mem_block1 = (char *)malloc(50*MB); > mem_block2 = (char *)malloc(50*MB); > getchar(); /* give chance to run ps */ > free(mem_block2); > get_char(); /* give chance to run ps */ > } > > Under 4.0F the VSIZE is approx 100Mb + some process overhead > Under 3.2G the VSIZE is approx 50MB + some process overhead. > > Unfortunately I no longer have access to the 3.2G box. > > Does anyone know for certain if the memory management was changed from > 3.2, in which malloc()/free() off-loaded all memory management to the > kernel, and 4.0F which appears to expect the user processes to manage > free space with malloc()/free()? I'm guessing this change (if I'm > right) was made for kernel efficiency - for example, less scanning of > free lists, less swap allocation/deallocation activity, etc. > > Regards, > Hugh Patrick > >