LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-20-2007, 12:17 PM   #1
x_terminat_or_3
Member
 
Registered: Mar 2007
Location: Plymouth, UK
Distribution: Fedora Core, RHEL, Arch
Posts: 342

Rep: Reputation: 38
Memory leak suspected, how to confirm


Hi there.

My memory usage seems to go up all the time, and only goes down a little bit when closing programs.

I suspect a program is leaking memory.

How can I confirm this and identify the misbehaving program?

Thanks
 
Old 06-20-2007, 12:35 PM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Linux Memory Management
 
Old 06-20-2007, 12:38 PM   #3
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Please read this link about swappiness. If it will make you happy, you can change swappiness so that the tool you use to check memory load gives a different number. It's almost certain that there is no problem with your system.

http://gentoo-wiki.com/FAQ_Linux_Mem...2.6_kernels.29
 
Old 06-20-2007, 12:43 PM   #4
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
It's either a REAL memory leak or as the two posters have said before the normal consequence of Memory Management in Linux. In Linux, free memory is considered wasted memory and should better be used as caching.

If you really think it's a memory leak, you could try E-fence or valgrind
http://freshmeat.net/projects/efence/
http://freshmeat.net/projects/valgrind/

If the memory goes up and up without you doing anything, then I would say it is a memory leak.

Last edited by nx5000; 06-20-2007 at 12:44 PM.
 
Old 06-20-2007, 01:10 PM   #5
x_terminat_or_3
Member
 
Registered: Mar 2007
Location: Plymouth, UK
Distribution: Fedora Core, RHEL, Arch
Posts: 342

Original Poster
Rep: Reputation: 38
Thanks all for the information.

Right after I posted this question, I thought... huh, why don't I just check it in top, sort by memory usage, and see which ones are increasing.

I noticed one that went steadily upwards, and that was hald monitoring hiddev0

I killed that program and my memory usage went down with 130MB, and hasn't moved since...
 
  


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
Memory leak? habl Slackware 11 02-02-2007 03:44 PM
Suspected memory leak in Mandriva 2006 in KDE FreakShiny Mandriva 4 02-07-2006 12:26 AM
memory leak mfitzpat Linux - Newbie 1 09-24-2004 02:58 PM
Memory Leak when using memory debugging C program on SuSE SLES8 babalina Linux - Distributions 0 10-06-2003 09:39 AM
Memory Leak FredrikN Linux - General 4 09-17-2002 03:16 PM

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

All times are GMT -5. The time now is 07:43 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
Open Source Consulting | Domain Registration