Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
* Memory Management
@ 2000-11-14  5:00 root
  2000-11-16  4:25 ` Park, Byoung-Kyu
  2000-11-17  5:00 ` Nikola Milutinovic
  0 siblings, 2 replies; 9+ messages in thread
From: root @ 2000-11-14  5:00 UTC (permalink / 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





^ permalink raw reply	[flat|nested] 9+ messages in thread
* Memory management
@ 2002-05-08  6:33 Miha Andrejasic
  2002-05-08 16:38 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
  0 siblings, 1 reply; 9+ messages in thread
From: Miha Andrejasic @ 2002-05-08  6:33 UTC (permalink / raw)


Hello!

I have a question regarding memory on my computer. I have Digital PWS
433a with Tru64 5.1A. I also have 512MB of memory.

I am having some problems with one of my programs. When I start the
program, it checks for available memory. It says that it requires at
least 256MB of memory. When the sistem is fresh everything is OK. But
when I close the program and start it again it says that there is no
more than 140MB of memory left. 
If I want to use program again I have to shutdown system and boot it up
again. 
I was told that this is a problem with memory allocation and that this
allocated memory isn't freed after use or when the program closes.

Is there anything I can do to free memory with software so I won't have
to reboot time after time just to use this program?

Thanx for your help.

CCCao
-- 
Miha Andrejasic


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2002-05-08 16:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-14  5:00 Memory Management root
2000-11-16  4:25 ` 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.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox