LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Memory Allocation Problem? (https://www.linuxquestions.org/questions/linux-software-2/memory-allocation-problem-146103/)

lanky666 02-14-2004 04:09 PM

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?

DrOzz 02-14-2004 05:39 PM

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 ...

lanky666 02-14-2004 06:17 PM

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).

DrOzz 02-14-2004 06:27 PM

Quote:

Originally posted by lanky666
When windows closes a program, it frees it from memory altogether.
i would use that term very carefully :D ;)


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