LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-17-2005, 06:14 AM   #1
nicola54
LQ Newbie
 
Registered: Jun 2005
Posts: 2

Rep: Reputation: 0
Memory release


Hello to everyone.
My question is related to the memory used on my Linux ws RedHat 9.0 that I see using top command.
After my applications are finished I do not see the memory is released.
Is this a normal behavior of the system or I need to do something to release the memory, and what about the performance of the system with the memory not released ?

Thanks to all.

nicola
 
Old 06-17-2005, 06:14 AM   #2
nicola54
LQ Newbie
 
Registered: Jun 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Memory release

Merged your two threads together, no need for two of them.

Last edited by trickykid; 06-17-2005 at 06:31 AM.
 
Old 06-17-2005, 06:23 AM   #3
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
Linux generally does this automatically for you. It caches as much as it can in RAM, so that the performance of the system improves. When you need that memory for something else, the kernel will free it up for you.

It is perfectly normal for your RAM to be nearly full

I hope this helps
--Ian
 
Old 06-17-2005, 06:33 AM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Why are people so fascinated in the process of their memory releasing whatever when its done so it can sit there and do nothing? I like the fact with Linux that my RAM is *actually* being used all the time.. and all of it.. just a good feeling my money didn't go to waste in buying RAM and it not being wasted by not being used..
 
Old 06-17-2005, 08:08 AM   #5
amosf
Senior Member
 
Registered: Jun 2004
Location: Australia
Distribution: Mandriva/Slack - KDE
Posts: 1,672

Rep: Reputation: 46
I have 515308 and it's using 507344. Cool... But how do I get it to use the last 7964? It's getting wasted and I PAID for that!!!
 
Old 06-17-2005, 08:51 AM   #6
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Quote:
Originally posted by amosf
I have 515308 and it's using 507344. Cool... But how do I get it to use the last 7964? It's getting wasted and I PAID for that!!!
Just start a memory hungry app. For that, Linux will even use more of your swap, giving you more value for your money.
 
Old 06-17-2005, 11:33 AM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally posted by reddazz
Just start a memory hungry app. For that, Linux will even use more of your swap, giving you more value for your money.
Mmmmm... swwwwwaaaaaap!
 
Old 06-17-2005, 09:04 PM   #8
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
Code:
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>

extern int errno;

#define MAXMB (4<<10)
#define MB (1<<20)
#define PG (4<<10)

int main(argc,argv)
int argc;
char *argv[];
{
        char *m;
        int i,j;
        sleep(3);
        for(i=0;i<MAXMB;i++) {
                m=malloc(MB);
                printf("%d MB ...",i+1);
                if(errno || (m==NULL)) break;
                for(j=0;j<MB;j+=PG) m[j]='A';
                printf(" WooHoo\n");
        }
        printf("\n\nAllocated %d MB\n",i);
        exit(0);
}
in your face mem thingy

Code:
             ___  _____
            .'/,-Y"     "~-.
            l.Y             ^.
            /\               _\_      
           i            ___/"   "\
           |          /"   "\   o !
           l         ]     o !__./
            \ _  _    \.___./    "~\
             X \/ \            ___./
            ( \ ___.   _..--~~"   ~`-.
             ` Z,--   /               \
               \__.  (   /       ______)
                 \   l  /-----~~" /
                  Y   \          /
                  |    "x______.^
                  |           \      
                  j            Y
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tool to detect number of memory slots, memory module type, speed, and size stefanwolf Linux - Hardware 8 04-22-2013 09:48 AM
SUSE Release 10 RC1 Release Candidate 1 available 1kyle SUSE / openSUSE 8 09-11-2005 06:26 PM
Help!?! RH 8 Memory Mapping -High Memory-Virtural Memory issues.. Merlin53 Linux - Hardware 2 06-18-2003 04:48 PM
RH 8.0 Mapping Virtual Memory to get access to VMIC Reflective Memory PCI card. Merlin53 Linux - Hardware 0 05-05-2003 12:50 PM
How do you release memory? Paul12 Linux - General 1 08-22-2001 04:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration