[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Some memory statistics (fwd)
From:       Andrew LIST Mail Account <listasj () cban ! com>
Date:       1999-02-26 14:08:29
[Download RAW message or body]

On Fri, 26 Feb 1999, Mario Weilguni wrote:
> 
> kwm uses quite some memory, for each window ~48 KB, and QApplication uses
> around 128KB for each instance. "-Os" helps a bit, but most of the memory does
> not come from code but from data. IMO, reducing this for the next version
> should be a major goal.

Ok, maybe you can help me out here.

You really want to keep the TRS under control, and that's about it.  The
rest of the program can be kept on disk (ie, not loaded from the
executable) into memory if the OS does not think it wise.  On the other
side the TRS is new memory you've allocated hence can only be moved to
swap if the system runs short of memory.

 
> * kwm seems to alloc memory for each window, it does not release after the
> window is closed. However, it seems to reuse this memory. Same applies for X,
> maybe a memory leak?

Are you sure you're not just seeing the granularity of the VM manager, and
perhaps a little memory fragmentation within the app?
 
I wrote a little memory debugger for kSirc called kplunger, it's in cvs. 
It counts new() calls (not malloc sorry) and gives some intresting stats. 
Much better than using in /proc which is based on 4k pages and lies.  (Ok
it doesn't lie, but it's very hard to get usefull info out of it) 

Cheers, Andrew

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic