This forum has been archived. All content is frozen. Please use KDE Discuss instead.

--enable-memleak-check ?

Tags: None
(comma "," separated)
User avatar
kriko
Registered Member
Posts
164
Karma
0
OS

Mon Feb 12, 2007 11:43 am
Another question about memory leak:
Does it leave traces in swap? After some time my swap starts to grow (slowly) - just some MB not much. Because my system never used swap, since I don't use huge apps.
imported4-Tomasu
Registered Member
Posts
302
Karma
0

Mon Feb 12, 2007 12:37 pm
Linux will store stuff in Swap, and if stuff doesn't get used, it won't get moved out of swap. A little swap usage is nothing to worry about.

I don't actually use any swap these days. With 1.5GB ram, if something is going crazy, I want the OOM to kill it right away, instead of when ever swap runs out.
User avatar
kriko
Registered Member
Posts
164
Karma
0
OS

Sun Feb 18, 2007 1:41 pm
But my swap was never even touched, unless I used some demanding applications, like vmware. Now swap is being used constantly (just a couple of MB) and it is growing slowly until I reboot my pc - logging off it is not enough. I think it is ktorrent related.
I launched kde from console, like this:

Code: Select all
xinit
startkde


and just when ktorrent started up I got:
Code: Select all
X Error: BadMatch (invalid parameter attributes) 8
  Major opcode:  158
  Minor opcode:  6
  Resource id:  0x1a5
LeakTrace results :
        0x0xb6df8737 0x0x811f348 8 bytes
        0x0xb7093dd0 0x0x811f370 32 bytes
        0x0xb6df8761 0x0x811f3b0 32 bytes
        0x0xb6d99d3d 0x0x811f3f0 4 bytes
        0x0xb6d99d4b 0x0x811f418 12 bytes
        0x0xb6d491cc 0x0x811f440 12 bytes
        0x0xb6d4906c 0x0x811f468 12 bytes
        0x0xb744bbb3 0x0x8133d08 12 bytes
        0x0xb751299c 0x0x8133d30 28 bytes
        0x0xb744bbcc 0x0x8133d68 12 bytes
        0x0xb751299c 0x0x8133d90 28 bytes
        0x0xb744bbec 0x0x8133dc8 32 bytes
        0x0xb751282c 0x0x8133e08 28 bytes
        0x0xb751282c 0x0x8133e40 28 bytes
        0x0xb751282c 0x0x8133e78 28 bytes
        0x0xb751282c 0x0x8133eb0 28 bytes
        0x0xb751282c 0x0x8133ee8 28 bytes
        0x0xb751282c 0x0x8133f20 28 bytes
        0x0xb751282c 0x0x8133f58 28 bytes
        0x0xb751282c 0x0x8133f90 28 bytes
        0x0xb751282c 0x0x8133fc8 28 bytes
        0x0xb751282c 0x0x8134000 28 bytes
        0x0xb751282c 0x0x8134038 28 bytes
        0x0xb751282c 0x0x8134070 28 bytes
        0x0xb751282c 0x0x81340a8 28 bytes
        0x0xb751282c 0x0x81340e0 28 bytes
        0x0xb751282c 0x0x8134118 28 bytes
        0x0xb751282c 0x0x8134150 28 bytes
        0x0xb751282c 0x0x8134188 28 bytes
        0x0xb751282c 0x0x81341c0 28 bytes
        0x0xb751282c 0x0x81341f8 28 bytes
        0x0xb7445f2e 0x0x81352b8 32 bytes
        0x0xb70a98ee 0x0x8135390 12 bytes
        0x0xb7445eab 0x0x81353b8 28 bytes
        0x0xb70af6dd 0x0x81353f0 12 bytes
        0x0xb70a98ee 0x0x8135450 12 bytes
        0x0xb709fa53 0x0x8135550 32 bytes
        0x0xb6d9c9ba 0x0x8137378 12 bytes
        0x0xb70a98ee 0x0x81373e0 12 bytes
        0x0xb70a98ee 0x0x81373f0 12 bytes
        0x0xb70ac29f 0x0x8137498 68 bytes
        0x0xb6d9c9ac 0x0x8137558 4 bytes
        0x0xb70c9ae0 0x0x8137568 20 bytes
        0x0xb6d3aa2f 0x0x81375e8 12 bytes
        0x0xb70c880d 0x0x81375f8 42 bytes
        0x0xb70c8b7b 0x0x8137628 22 bytes
        0x0xb6d39da9 0x0x8137648 12 bytes
        0x0xb73301bd 0x0x8137860 28 bytes
        0x0xb70a98ee 0x0x8137930 12 bytes
        0x0xb70c868e 0x0x811dce0 20 bytes
        0x0xb7432a04 0x0x8137b50 8 bytes
        0x0xb70a98ee 0x0x8137b88 12 bytes
        0x0xb709b226 0x0x8137b98 48 bytes
        0x0xb709fa53 0x0x8137cd8 32 bytes
====================
Total : 54 leaks, 1260 bytes leaked


And this happens also when ktorrent is shutting down (or even randomly while it is running).
When it is not running, those messages doesn't shows up in console!
Maybe my swap usage is related to ktorrent, but I'm not 100% sure. I'll be running whole day without ktorrent to see if it is related to it.

I'm using ktorrent 2.1 stable, compiled with some extra flags:
Code: Select all
./configure --prefix=/opt/kde3 CFLAGS="-march=k8 -O2 -funroll-all-loops -funit-at-a-time -fpeel-loops -ftracer  -funswitch-loops -pipe -fomit-frame-pointer -fweb" CHOST="x86_64-pc-linux-gnu" CXXFLAGS="${CFLAGS}" MAKEOPTS="-j6"  --enable-memleak-check
George
Moderator
Posts
5421
Karma
1

Sun Feb 18, 2007 3:05 pm
run with the --nofork option
User avatar
kriko
Registered Member
Posts
164
Karma
0
OS

Sun Feb 18, 2007 4:54 pm
You mean to start ktorrent like this:
Code: Select all
ktorrent --nofork

?
User avatar
kriko
Registered Member
Posts
164
Karma
0
OS

Sun Feb 18, 2007 9:33 pm
Ok, ktorrent was running for some time and I gathered some outputs.
leak.log is from leak-analyze, ktor.log is console output from ktorrent (note - ktor.log was filled as I quitted ktorrent).

Files are here:
http://files.myopera.com/kriko/files/Archive.tar.bz2
File updated 19.2.2007


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]