On Fri, Sep 05, 2003 at 07:01:48AM +0200, Nemec, Bernhard wrote:
> > the menuitems is clicked. When i measure free memory in the 
> > system (using 
> > shell command free), i see that every opening and closing of 
> > the menu spends 
> > 4kB of memory. No memory is spent when there is no bitmap.
> 
> You cannot use the "free" command to detect memory leaks. On Linux, unused
> memory is used as cache whenever possible, and will not be reported as free
> by the "free" command.

Uh...

$ free
             total       used       free     shared    buffers     cached
Mem:        385544     380708       4836          0      33580      93616
-/+ buffers/cache:     253512     132032
Swap:       341696     171236     170460

That second line doesn't include buffers or cache, and actually
measures usage by programs.

Of course, it's still better to use ps or top or something to actually
measure per-process memory usage, or better yet a proper memory
profiler.

-- Nathaniel

-- 
"Lull'd in the countless chambers of the brain,
Our thoughts are link'd by many a hidden chain:
Awake but one, and lo! what myriads rise!
Each stamps its image as the other flies"
  -- Ann Ward Radcliffe, The Mysteries of Udolpho


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Pgui-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/pgui-devel

Reply via email to