LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-05-2008, 06:22 AM   #1
FantaJ
LQ Newbie
 
Registered: Mar 2008
Posts: 2

Rep: Reputation: 0
Memory usage using TOP


I'm running an app where I know the memory the app is using is increasing and I can see it growing with TOP (VIRT and RES). I then know the app has no need of the memory (it's stopped doing the heavy work) but I see from TOP that the app has not released the memory.

The app is still running but does it not release the memory until another app needs it? Any insight be great, thanks!

I'm using Ubuntu on: Linux computer 2.6.20-16-generic #2 SMP Fri Aug 31 00:55:27 UTC 2007 i686 GNU/Linux
 
Old 03-05-2008, 11:35 AM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
This means the app probably has a memory leak. If you kill the app, the memory it was using will probably be reclaimed. If you're the developer of this app, fix it, if not, then mention this to the developers and have them look into it. Of course, if this happens to be a big, bloated KDE app or something like Open Office, then this is just a fact of life. These programs are bloated and leaky.
 
Old 03-05-2008, 12:35 PM   #3
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by FantaJ View Post
I can see it growing with TOP (VIRT and RES).
Quote:
The app is still running but does it not release the memory until another app needs it?
Which do you expect it to release: virtual or physical?

If the app is done with the data objects taking up the virtual memory and has correctly released those data objects, it is still a complex process to get the virtual memory released and even without any memory leak there may be no significant release of virtual memory without the app exiting.

If the app does release any virtual memory, then necessarily the OS will take back the associated physical memory. Other than that, the app has no way to release physical memory.

If the app is holding on to dead virtual memory that it isn't actually using, it is normal and correct for the OS to swap that out only when some other task wants some memory.
 
  


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
X hangs after prolonged usage ... memory usage goes upto 195MB duryodhan Slackware 18 05-10-2007 06:16 PM
How do I read the memory usage in top? jaakkop Linux - Hardware 1 03-10-2006 10:12 AM
Firefox gets stuck... top shows 98-99% memory usage amitsharma_26 Linux - General 26 12-28-2005 03:01 PM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM
Memory usage reported using TOP Kdiver58 Linux - Newbie 1 02-03-2003 01:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:56 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