Mailinglist Archive: opensuse-kde (37 mails)

< Previous Next >
[opensuse-kde] Fwd: [PATCH] KWin: Fix memory leak in Workspace::rootStackingOrder
  • From: Scott Newton <scottn@xxxxxxxxxx>
  • Date: Sat, 10 May 2008 20:26:15 +1200
  • Message-id: <200805102026.16216.scottn@xxxxxxxxxx>
Can we get this patch applied to 4..0.4 in openSUSE?

KWin Version: kde4-kwin-4.0.4-10.1
Top sorted by swap.

On initial boot:

top - 08:34:17 up 8 min,  1 user,  load average: 0.74, 1.09, 0.60
Tasks: 182 total,   2 running, 180 sleeping,   0 stopped,   0 zombie
Cpu(s):  2.5%us,  0.5%sy,  0.0%ni, 96.2%id,  0.5%wa,  0.0%hi,  0.3%si,  0.0%st
Mem:   1028824k total,   952852k used,    75972k free,    33340k buffers
Swap:  2104504k total,     1052k used,  2103452k free,   292488k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  SWAP COMMAND
 5329 scott     15   0  551m  51m  15m S    0  5.1   0:01.67 500m knotify4
 5680 scott     15   0  458m  52m  29m S    0  5.2   0:10.59 405m kontact
 5474 scott     15   0  456m  51m  30m R    0  5.2   0:02.69 404m amarokapp
 5310 scott     15   0  355m  30m  20m S    0  3.0   0:02.10 324m kded4
 5702 scott     15   0  353m  47m  29m S    0  4.7   0:03.95 305m konqueror
 5386 scott     15   0  337m  32m  19m S    0  3.2   0:01.15 304m akregator
 5330 scott     15   0  322m  34m  20m S    0  3.4   0:04.64 288m plasma
 5366 scott     15   0  311m  28m  19m S    0  2.8   0:00.47 282m kopete
 5509 scott     15   0  289m  21m  15m S    0  2.1   0:00.42 268m korgac
 4166 wwwrun    23   0  266m 4956  548 S    0  0.5   0:00.00 261m httpd2-
prefork
 4165 root      15   0  266m 9060 4660 S    0  0.9   0:00.11 257m httpd2-
prefork
 5346 scott     15   0  280m  24m  15m S    0  2.4   0:00.87 256m krunner
 5388 scott     15   0  266m  23m  15m S    2  2.4   0:04.79 243m superkaramba
 5320 scott     15   0  269m  40m  22m S    0  4.0   0:04.06 228m kwin
 5359 scott     15   0  239m  22m  14m S    1  2.2   0:00.79 216m konsole
 5361 scott     15   0  239m  24m  16m S    0  2.5   0:00.76 215m yakuake
 5452 scott     15   0  232m  19m  13m S    0  1.9   0:00.56 212m kmix
 5368 scott     15   0  228m  23m  15m S    0  2.3   0:00.67 205m kget

After being up for ten and a half hours:

top - 18:59:42 up 10:33,  1 user,  load average: 0.59, 0.32, 0.18
Tasks: 159 total,   1 running, 158 sleeping,   0 stopped,   0 zombie
Cpu(s):  2.3%us,  1.5%sy,  0.0%ni, 94.5%id,  1.2%wa,  0.0%hi,  0.5%si,  0.0%st
Mem:   1028824k total,  1018692k used,    10132k free,     2904k buffers
Swap:  2104504k total,  1820016k used,   284488k free,   147444k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  SWAP COMMAND
 5320 scott     15   0 2190m 534m  15m S    1 53.2   4:01.30 1.6g kwin
 5329 scott     15   0  549m  13m 9664 S    0  1.3   0:09.78 536m knotify4
 5474 scott     15   0  492m  13m 8024 S    0  1.3   1:10.76 479m amarokapp
 5680 scott     15   0  489m  37m  18m S    0  3.7   0:56.76 452m kontact
18929 scott     15   0  400m  31m  16m S    0  3.2   1:16.36 368m konqueror
 5310 scott     15   0  369m  17m  11m S    0  1.7   0:24.07 352m kded4
 5386 scott     15   0  351m  25m  14m S    0  2.5   0:20.74 325m akregator
 4071 scott     15   0  324m  18m  11m S    0  1.8   0:13.18 306m plasma
 5366 scott     15   0  308m  10m 9748 S    0  1.1   0:00.86 297m kopete
 5509 scott     15   0  286m 9708 8148 S    0  0.9   0:00.73 277m korgac
 5346 scott     15   0  278m  10m 9116 S    0  1.0   0:03.19 267m krunner
 4166 wwwrun    23   0  266m  336  328 S    0  0.0   0:00.00 266m httpd2-
prefork
 4165 root      15   0  266m 1508 1472 S    0  0.1   0:00.12 265m httpd2-
prefork
 5388 scott     16   0  267m  12m 9928 S    2  1.2   8:46.17 255m superkaramba
 5361 scott     15   0  240m  11m 9340 S    0  1.1   0:03.71 229m yakuake
 5359 scott     15   0  240m  14m 9892 S    0  1.4   0:05.62 225m konsole
 5452 scott     15   0  232m 9652 8232 S    0  0.9   0:00.91 222m kmix
 5368 scott     15   0  225m  10m 9704 S    0  1.1   0:00.97 214m kget

Thanks


---------- Forwarded Message ----------

Subject: [PATCH] KWin: Fix memory leak in Workspace::rootStackingOrder
Date: Monday 05 May 2008
From: Kelvie Wong <kelvie@xxxxxxxx>
To: kde-devel@xxxxxxx

This would leak memory every time compositing takes place, and really adds up
over time (I get about 500k/minute with a bunch of windows open). KWin stays
at
a lean 23MB after this patch.

This was introduced by r800581.
---
workspace/kwin/layers.cpp | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/workspace/kwin/layers.cpp b/workspace/kwin/layers.cpp
index 1b845eb..e5e52b8 100644
--- a/workspace/kwin/layers.cpp
+++ b/workspace/kwin/layers.cpp
@@ -740,6 +740,10 @@ ToplevelList Workspace::rootStackingOrder() const
}
foreach( Deleted* c, deleted )
ret.append( c );
+
+ if (windows)
+ XFree(windows);
+
return ret;
}

--
1.5.5.GIT


Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe
<<


-------------------------------------------------------

--
Regards
Scott Newton
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-kde+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-kde+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups