[Kde-bindings] Memleak in Korundum?

Caleb Tennis caleb at aei-tech.com
Mon Aug 28 17:23:32 UTC 2006

> Without a tool like MallocDebug it's very hard to fix this sort of thing,
> and
> I don't know of anything similar for Linux - is there one of the valgrind
> related tools for doing this?


I've found that this happens extremely fast when using dcop signals/slots.
 I have a simple KApplication that has a dcop slot, and I invoke it from
an external program with a DCOP signal.  I see no memory consumption if
the slot has 0 arguments, but as soon as I'm marshalling data, it seems
that memory consumption grows very fast.  Below is the the valgrind look
at the code that is being consumed.  The number of bytes "lost" continues
to grow the longer the program runs (as opposed to all of the other
warnings valgrind throws which seem to be the same amount no matter how
long the program runs):

==13625== 14,580 bytes in 215 blocks are definitely lost in loss record
182 of 201
==13625==    at 0x4020849: operator new[](unsigned) (in
==13625==    by 0x43AB278: construct_copy(smokeruby_object*)
==13625==    by 0x43AC021: marshall_basetype(Marshall*) (handlers.cpp:711)
==13625==    by 0x43A6D88: VirtualMethodCall::next() (Qt.cpp:306)
==13625==    by 0x43A9190: marshall_QCString(Marshall*) (handlers.cpp:975)
==13625==    by 0x43A6D88: VirtualMethodCall::next() (Qt.cpp:306)
==13625==    by 0x43A81F4: QtRubySmokeBinding::callMethod(short, void*,
Smoke::StackItem*, bool) (Qt.cpp:814)
==13625==    by 0x4C5308A: x_DCOPObject::process(QCString const&,
QMemArray<char> const&, QCString&, QMemArray<char>&) (x_1.cpp
==13625==    by 0x62F22EA: DCOPClient::receive(QCString const&, QCString
const&, QCString const&, QMemArray<char> const&, QCStr
ing&, QMemArray<char>&) (in /usr/kde/3.5/lib/libDCOP.so.4.2.0)
==13625==    by 0x62F65BA: (within /usr/kde/3.5/lib/libDCOP.so.4.2.0)
==13625==    by 0x62F6CD2: (within /usr/kde/3.5/lib/libDCOP.so.4.2.0)
==13625==    by 0x630183E: KDE_IceProcessMessages (in

More information about the Kde-bindings mailing list