[KLUG Members] free command

Adam Williams members@kalamazoolinux.org
Mon, 25 Jun 2001 16:36:44 -0400 (EDT)


>>>I execute free before running a memory hog of a program.  Then after exiting the
>>>program, I have less free memory then before starting it. Does this mean that
>>>there is a problem with the program freeing memory, or is it that the kernel
>>>assuming you may use the exact same files again and not showing the space as
>>>free?
>>>The program in question is the gimp.
>>Here is a god explanation of what your seeing....
>>http://www.linuxbrit.co.uk/tips/#mem_usage
>Thanks, I thought it might be something like that.  Gimp may be a hog when it
>opens some of those large image files, but I was sure it wouldn't have problems
>of the magnitude I thought I was seeing.  I just needed a little more
>knowledge.  I feel more powerful already.  knowledge=power?

One thing this article doesn't mention ist that multi-threaded apps will
show up in the process list once for every thread (three threads = app
shows up three times).  And since threads share memory each of the threads
appears in ps, top, gtop to be using the total amount of memory
exaggerating (sometimes greatly) the amount of memory used. (1 app using
10Mb has three threads,  total from ps is that 30Mb is consumed, which is
not accurate.)  I just looked an it doesn't appear that gimp is
multithreaded (WOW!), but many other apps are.

-- 
-----------------------------------------------------------
Ximian GNOME, Evolution, LTSP, and RedHat Linux + LVM & XFS
-----------------------------------------------------------