[Kde-games-devel] Re: possible memory leak with graphicssystem raster and kgamerenderer

Stefan Majewsky stefan.majewsky at googlemail.com
Mon Jul 25 23:26:59 CEST 2011


On Mon, Jul 25, 2011 at 8:56 PM, Mathias Kraus <k.hias at gmx.de> wrote:
> The kgamerenderer ones increases their memory with 5 to 6 resizes to over
> 100MiB while the other merely increase their memory.

I can confirm this on my system. A leak check using Valgrind turns up
a problem with rendering workers in synchronous rendering events; I
fixed this in trunk, my valgrind output of KDiamond now shows no leaks
related to KGameRenderer. However, the described problem is still
reproducable.

Interestingly, it seems that KGameRenderer never removes unused items
from its in-process pixmap cache. I do not know how this came; it
probably never was a problem with the X11 graphics system. When I
exchange the in-process pixmap cache with QPixmapCache, which
(according to the documentation) is limited in size to 10 MB, the
memleaking seems to be less fast, but it's still there. After resizing
the window slowly a few times, memory is up at 60 MiB.

This looks like the perfect opportunity for me to try Valgrind's
Massif tool, although not before Wednesday. Others with more
experience in the memleaking area might want to chip in at this point.

Greetings
Stefan


More information about the kde-games-devel mailing list