where is the cleared() signal to be connected?

Kwangwoo Lee kwlee at dynamicroot.org
Thu Oct 21 08:32:22 CEST 2004


Thanks, Luciano.

I tried to use valgrind with addrcheck, then I noticed these messages 
appears repeatedly.
(I'm using P3 1Ghz PC with Debian sarge)

$ valgrind -v --file-log=val-konq.addrcheck --tool=addrcheck 
--leak-check=yes

...
==6342==
==6342== 0 bytes in 1 blocks are definitely lost in loss record 1 of 350
==6342==    at 0x3414C9BD: operator new[](unsigned) 
(vg_replace_malloc.c:139)
==6342==    by 0x3480B2EC: (within /usr/lib/libqt-mt.so.3.3.3)
==6342==    by 0x348141F8: QString::fromLatin1(char const*, int) (in 
/usr/lib/libqt-mt.so.3.3.3)
==6342==    by 0x348148C1: QString::setLatin1(char const*, int) (in 
/usr/lib/libqt-mt.so.3.3.3)
==6342==
==6342==
==6342== 200 bytes in 1 blocks are definitely lost in loss record 263 of 350
==6342==    at 0x3414C5C1: malloc (vg_replace_malloc.c:131)
==6342==    by 0x34AE5B29: my_malloc (vg_libpthread.c:359)
==6342==    by 0x34AE950F: get_or_allocate_specifics_ptr 
(vg_libpthread.c:1729)
==6342==    by 0x34AE96C3: pthread_key_create (vg_libpthread.c:1766)
==6342==
==6342==
==6342== 216 bytes in 1 blocks are definitely lost in loss record 265 of 350
==6342==    at 0x3414C5C1: malloc (vg_replace_malloc.c:131)
==6342==    by 0x354DE7F2: _XimOpenIM (in 
/usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2)
==6342==    by 0x34A76E37: (within /usr/X11R6/lib/libX11.so.6.2)
==6342==    by 0x354DE0FE: _XimRegisterIMInstantiateCallback (in 
/usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2)
==6342==
==6342== LEAK SUMMARY:
==6342==    definitely lost: 416 bytes in 3 blocks.
==6342==    possibly lost:   0 bytes in 0 blocks.
==6342==    still reachable: 298714 bytes in 5470 blocks.
==6342==         suppressed: 0 bytes in 0 blocks.
==6342== Reachable blocks (those to which a pointer was found) are not 
shown.
==6342== To see them, rerun with: --show-reachable=yes
==6336== checked 32928156 bytes.
==6336==

These lines appeare many times when I reload the konq-e browser.
But I guess that these messages show up  because malloc and operator 
new[] in vg_replace_malloc.c
 is not implemented correctly. ( Am I right?? )

The outputs below is guessed the last messages when I quit the konq-e 
browser.
(These lines are at the end of the val-konq.addrcheck.pid6336. )
And it seems to have the same problems

Reguarding memory usage, the VmSize in the /proc/6336/status goes up 
with 24KB.
As you said it goes up fast to about 39xxxKB and then goes up with 24KB 
on reloading the page.

Well.. I'm drawing the call diagrams of the functions and the classes 
roughly with the openoffice Impress.

Regards,
Kwangwoo Lee


The rest of outputs is followed :

==6336==
==6336== 0 bytes in 1 blocks are definitely lost in loss record 1 of 309
==6336==    at 0x3414C9BD: operator new[](unsigned) 
(vg_replace_malloc.c:139)
==6336==    by 0x3480B2EC: (within /usr/lib/libqt-mt.so.3.3.3)
==6336==    by 0x348141F8: QString::fromLatin1(char const*, int) (in 
/usr/lib/libqt-mt.so.3.3.3)
==6336==    by 0x348148C1: QString::setLatin1(char const*, int) (in 
/usr/lib/libqt-mt.so.3.3.3)
==6336==
==6336==
==6336== 8 bytes in 1 blocks are definitely lost in loss record 35 of 309
==6336==    at 0x3414C753: operator new(unsigned) (vg_replace_malloc.c:133)
==6336==    by 0x3421ED92: KInstance::config() const (kinstance.cpp:44)
==6336==    by 0x815E8A8: KGlobal::config() (kglobal.h:71)
==6336==    by 0x815D10C: main (main.cc:144)
==6336==
==6336==
==6336== 16 bytes in 1 blocks are possibly lost in loss record 55 of 309
==6336==    at 0x3414C5C1: malloc (vg_replace_malloc.c:131)
==6336==    by 0x34D68ED2: FcPatternCreate (in 
/usr/lib/libfontconfig.so.1.0.4)
==6336==    by 0x34D6A7E8: FcPatternDuplicate (in 
/usr/lib/libfontconfig.so.1.0.4)
==6336==    by 0x344FC666: (within /usr/lib/libqt-mt.so.3.3.3)
==6336==
==6336==
==6336== 16 bytes in 1 blocks are definitely lost in loss record 56 of 309
==6336==    at 0x3414C5C1: malloc (vg_replace_malloc.c:131)
==6336==    by 0x34A2ED72: (within /usr/X11R6/lib/libX11.so.6.2)
==6336==    by 0x34A30C0B: XrmGetStringDatabase (in 
/usr/X11R6/lib/libX11.so.6.2)
==6336==    by 0x34A147B7: (within /usr/X11R6/lib/libX11.so.6.2)
==6336==
==6336==
==6336== 32 bytes in 1 blocks are definitely lost in loss record 105 of 309
==6336==    at 0x3414C753: operator new(unsigned) (vg_replace_malloc.c:133)
==6336==    by 0x3426445D: KCookieServer::KCookieServer(QCString const&) 
(kcookieserver.cpp:86)
==6336==    by 0x815DBC4: main (main.cc:288)
==6336==
==6336==
==6336== 36 bytes in 1 blocks are definitely lost in loss record 124 of 309
==6336==    at 0x3414C5C1: malloc (vg_replace_malloc.c:131)
==6336==    by 0x34D06568: nss_parse_service_list (nsswitch.c:529)
==6336==    by 0x34D05DD8: __GI___nss_database_lookup (nsswitch.c:133)
==6336==    by 0x3643136B: ???
==6336==
==6336==
==6336== 40 bytes in 1 blocks are definitely lost in loss record 135 of 309
==6336==    at 0x3414C753: operator new(unsigned) (vg_replace_malloc.c:133)
==6336==    by 0x815F28A: MainWindowBase::init() (mainwindowbase.cc:202)
==6336==    by 0x8164472: MainWindowBase::instantiate() 
(mainwindowbase.cc:1386)
==6336==    by 0x815DCD3: main (main.cc:307)
==6336==
==6336==
==6336== 40 bytes in 1 blocks are definitely lost in loss record 135 of 309
==6336==    at 0x3414C753: operator new(unsigned) (vg_replace_malloc.c:133)
==6336==    by 0x815F28A: MainWindowBase::init() (mainwindowbase.cc:202)
==6336==    by 0x8164472: MainWindowBase::instantiate() 
(mainwindowbase.cc:1386)
==6336==    by 0x815DCD3: main (main.cc:307)
==6336==
==6336==
==6336== 44 bytes in 1 blocks are definitely lost in loss record 139 of 309
==6336==    at 0x3414C753: operator new(unsigned) (vg_replace_malloc.c:133)
==6336==    by 0x818BB14: KIO::MimeHandler::Initialize() 
(mimehandler.cpp:308)
==6336==    by 0x815DB4C: main (main.cc:260)
==6336==
==6336==
==6336== 44 bytes in 1 blocks are definitely lost in loss record 140 of 309
==6336==    at 0x3414C753: operator new(unsigned) (vg_replace_malloc.c:133)
==6336==    by 0x818BA81: KIO::MimeHandler::Initialize() 
(mimehandler.cpp:305)
==6336==    by 0x815DB4C: main (main.cc:260)
==6336==
==6336==
==6336== 44 bytes in 1 blocks are definitely lost in loss record 141 of 309
==6336==    at 0x3414C753: operator new(unsigned) (vg_replace_malloc.c:133)
==6336==    by 0x818B9BF: KIO::MimeHandler::Initialize() 
(mimehandler.cpp:302)
==6336==    by 0x815DB4C: main (main.cc:260)
==6336==
==6336==
==6336== 44 bytes in 1 blocks are definitely lost in loss record 142 of 309
==6336==    at 0x3414C753: operator new(unsigned) (vg_replace_malloc.c:133)
==6336==    by 0x818B8FD: KIO::MimeHandler::Initialize() 
(mimehandler.cpp:299)
==6336==    by 0x815DB4C: main (main.cc:260)
==6336==
==6336==
==6336== 44 bytes in 1 blocks are definitely lost in loss record 143 of 309
==6336==    at 0x3414C753: operator new(unsigned) (vg_replace_malloc.c:133)
==6336==    by 0x818B750: KIO::MimeHandler::Initialize() 
(mimehandler.cpp:295)
==6336==    by 0x815DB4C: main (main.cc:260)
==6336==
==6336==
==6336== 48 bytes in 3 blocks are definitely lost in loss record 153 of 309
==6336==    at 0x3414C5C1: malloc (vg_replace_malloc.c:131)
==6336==    by 0x34D68ED2: FcPatternCreate (in 
/usr/lib/libfontconfig.so.1.0.4)
==6336==    by 0x34D6A7E8: FcPatternDuplicate (in 
/usr/lib/libfontconfig.so.1.0.4)
==6336==    by 0x344FC666: (within /usr/lib/libqt-mt.so.3.3.3)
==6336==
==6336==
==6336== 128 bytes in 1 blocks are definitely lost in loss record 202 of 309
==6336==    at 0x3414C753: operator new(unsigned) (vg_replace_malloc.c:133)
==6336==    by 0x3421EB88: KInstance::KInstance(char const*) 
(kinstance.cpp:27)
==6336==    by 0x3421B9AF: KApplication::KApplication(int, char**, char 
const*) (kapplication.cpp:39)
==6336==    by 0x815CFDF: main (main.cc:127)
==6336==
==6336==
==6336== 200 bytes in 1 blocks are definitely lost in loss record 222 of 309
==6336==    at 0x3414C5C1: malloc (vg_replace_malloc.c:131)
==6336==    by 0x34AE5B29: my_malloc (vg_libpthread.c:359)
==6336==    by 0x34AE950F: get_or_allocate_specifics_ptr 
(vg_libpthread.c:1729)
==6336==    by 0x34AE96C3: pthread_key_create (vg_libpthread.c:1766)
==6336==
==6336==
==6336== 216 bytes in 1 blocks are definitely lost in loss record 227 of 309
==6336==    at 0x3414C5C1: malloc (vg_replace_malloc.c:131)
==6336==    by 0x354DE7F2: _XimOpenIM (in 
/usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2)
==6336==    by 0x34A76E37: (within /usr/X11R6/lib/libX11.so.6.2)
==6336==    by 0x354DE0FE: _XimRegisterIMInstantiateCallback (in 
/usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2)
==6336==
==6336== LEAK SUMMARY:
==6336==    definitely lost: 944 bytes in 17 blocks.
==6336==    possibly lost:   16 bytes in 1 blocks.
==6336==    still reachable: 2030121 bytes in 6127 blocks.
==6336==         suppressed: 0 bytes in 0 blocks.
==6336== Reachable blocks (those to which a pointer was found) are not 
shown.
==6336== To see them, rerun with: --show-reachable=yes
--6336--     TT/TC: 0 tc sectors discarded.
--6336--            366969 tt_fast misses.
--6336-- translate: new     89367 (1427770 -> 10660183; ratio 74:10)
--6336--            discard 308 (3811 -> 32440; ratio 85:10).
--6336-- chainings: 66380 chainings, 0 unchainings.
--6336--  dispatch: 80800000 jumps (bb entries); of them 31253567 (38%) 
unchained.
--6336--            26037/1995795 major/minor sched events.
--6336-- reg-alloc: 329 t-req-spill, 1959362+850 orig+spill uis,
--6336--            224050 total-reg-rank
--6336--    sanity: 18653 cheap, 747 expensive checks.
--6336--    ccalls: 383461 C calls, 59% saves+restores avoided (1345066 
bytes)
--6336--            383904 args, avg 0.73 setup instrs each (206704 bytes)
--6336--            0% clear the stack (1150383 bytes)
--6336--            0 retvals, 100% of reg-reg movs avoided (0 bytes)
--6342--     TT/TC: 0 tc sectors discarded.
--6342--            28871 tt_fast misses.
--6342-- translate: new     25602 (408462 -> 3016077; ratio 73:10)
--6342--            discard 0 (0 -> 0; ratio 0:10).
--6342-- chainings: 16395 chainings, 0 unchainings.
--6342--  dispatch: 15500000 jumps (bb entries); of them 3654552 (23%) 
unchained.
--6342--            1361/291940 major/minor sched events.
--6342-- reg-alloc: 85 t-req-spill, 549300+212 orig+spill uis,
--6342--            64504 total-reg-rank
--6342--    sanity: 1302 cheap, 53 expensive checks.
--6342--    ccalls: 103321 C calls, 59% saves+restores avoided (360682 
bytes)
--6342--            103354 args, avg 0.71 setup instrs each (58090 bytes)
--6342--            0% clear the stack (309963 bytes)
--6342--            0 retvals, 100% of reg-reg movs avoided (0 bytes)



More information about the konq-e mailing list