LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-14-2004, 05:09 PM   #1
lanky666
LQ Newbie
 
Registered: Feb 2004
Posts: 2

Rep: Reputation: 0
Exclamation Memory Allocation Problem?


I am very new to linux and there are about a million questions which I could ask, but I'll start with this because it seems to be the most important one:

I have Red Hat 9 installed on my computer. I recently figured out that I could add system monitoring graphs to the Gnome panel. This is when I first realized there was a problem.

When linux first boots up, the memory usage graph indicates that a small chunk of memory is in use (maybe 15%). This is normal as far as I know. Obviously, the amount of memory in use should increase as I open programs. However, it doesn't seem to ever decrease. After I have been using the computer for a while, the graph will indicate that 97-100% of the system memory is in use. Meanwhile, the swap stays at 0%. Most of the time I have AIM, XMMS, and few Mozilla windows open and that's it.

Is it possible that memory is being allocated for programs that are opened and then not being freed when they are closed? Or is there a known bug with the system monitor program? There may even be a log file somewhere which tells me exactly what the problem is, but I don't have the slightest idea where to look.

Linux Distribution: Red Hat 9
Total RAM: 512MB
Total swap: 1.0GB (half in a swap partition, half in a swap file)
Processor: Pentium 3, 800MHz
Installed software (didn't come with Red Hat): AIM, NVIDIA graphics card driver

Anyone have any ideas?
 
Old 02-14-2004, 06:39 PM   #2
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 59
well first read this
to make sure your not misunderstanding memory managment in linux ...
secondly, try typing the following command into a terminaL :
top
and see if you see anything unusual in the %CPU & %MEM columns and take note of what it is causing it ...
 
Old 02-14-2004, 07:17 PM   #3
lanky666
LQ Newbie
 
Registered: Feb 2004
Posts: 2

Original Poster
Rep: Reputation: 0
Ok... I think I get it:

Linux manages memory differently than windows (what I'm used to) does. When windows closes a program, it frees it from memory altogether. When Linux closes a program, the program stays in memory until something else needs to use that memory. If I open the same program again, it doesn't need to be loaded from the hard drive. Basically, stuff can stay in RAM until it absolutely needs to be removed. What the system monitor is showing me isn't incorrect, nor is it a problem.

Thank you very much for your response. I'm sorry I didn't find that thread before I posted (I tried).
 
Old 02-14-2004, 07:27 PM   #4
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 59
Quote:
Originally posted by lanky666
When windows closes a program, it frees it from memory altogether.
i would use that term very carefully
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
memory allocation esael Linux - General 7 01-12-2008 01:12 PM
memory allocation gecoool Programming 2 10-24-2005 10:47 AM
Help - memory allocation in C zaichik Programming 3 09-04-2005 11:16 AM
C programming: memory allocation / pointer problem I think sterrenkijker Programming 2 04-17-2005 04:07 AM
memory allocation. raven Programming 5 09-08-2002 02:50 PM


All times are GMT -5. The time now is 03:04 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration