From: root <hugh.patrick@virgin.net>
Subject: Memory Management
Date: 2000/11/14 [thread overview]
Message-ID: <3A11AFE6.194B9261@virgin.net> (raw)
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 <stdio.h>
#include <stdlib.h>
#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
next reply other threads:[~2000-11-14 5:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-14 5:00 root [this message]
2000-11-16 4:25 ` Memory Management Park, Byoung-Kyu
2000-11-17 2:07 ` Hugh Patrick
2000-11-17 5:00 ` Robert Mulley
2000-11-17 5:00 ` Hugh Patrick
2000-11-17 5:00 ` Nikola Milutinovic
2000-11-18 5:00 ` Hugh Patrick
-- strict thread matches above, loose matches on Subject: below --
2002-05-08 6:33 Memory management Miha Andrejasic
2002-05-08 16:38 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox