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

List:       kde-core-devel
Subject:    Re: *Nasty* memory leakage in kdesktop
From:       Kurt Granroth <granroth () kde ! org>
Date:       2001-06-27 19:40:33
[Download RAW message or body]

On Sunday 24 June 2001 03:35 pm, Dirk Mueller wrote:
> > That last change was interesting in one respect, though.  I had X at
> > 16bit color and every time the wallpaper changed, it went up exactly
> > 1.54M.  So I upped the depth to 24bit to test.. and it started going up
> > exactly 2.31M. Those numbers aren't random -- 24 is 50% greater than 16
> > and 2.31M is 50% greater than 1.54M.  Wanna bet if the number changes
> > proportionally if I change the screen size?
>
> would you mind adding kdDebug statements at the apropiate places in
> libbackground that does the painting to find out why it leaks ?

After a bit of a break, I looked at this again.  I am now thinking that the 
bug is either in my X server or in Qt itself.  I selectively commented out 
code until I found the one line where the "leak" happens.  It is here:

338    m_pDesktop->setBackgroundPixmap(*pm);

This is in the 'setPixmap' method in kdesktop/bgmanager.cc

If I comment out this line, then the X server does not grow.  I commented out 
the pixmap servers, the raw X calls.. even the Renderer itself (I then used a 
null pixmap to test).  The ONLY call that has any effect on the size of the X 
server is the setBackgroundPixmap.  Every time it is called, the X server 
grows by a consistent amount determined by the size and depth of the pixmap.

Since this is pretty basic code in Qt, I don't know where else to look...
-- 
Kurt Granroth            | http://www.granroth.org
KDE Developer/Evangelist | SuSE Labs Open Source Developer
granroth@kde.org         | granroth@suse.com
            KDE -- Conquer Your Desktop

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

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