Increasing memory usage

Ralf Hoffmann ralf at boomerangsworld.de
Thu Feb 9 12:10:18 PST 2012


Hello,

I'm trying to use dbus to access udisks and I'm experience an increasing
memory usage. I have reduced the code the smallest possible program to
find what I'm doing wrong. Now there is only code to create and free a
proxy object. When executed in a loop, the program uses more and more
memory. I have attached the file which I compiled with

gcc -g dbus-test.c -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -ldbus-glib-1

When called like "./a.out 1000000" the memory usage increased to more
than 500MB.

So my question is: Do I need to call some other cleanup function to keep
the memory usage constant? The memory usage of the dbus-daemon also
increases to a similar amount.

I have done tests with dbus-1.2.14 and dbus-1.5.8.

I should add that I do not know much about DBus programming and just
followed the tools in the udisks package so maybe I just missing the
right functions to really free the proxy object.

On the other hand, the example at
http://dbus.freedesktop.org/doc/dbus-tutorial.html#sample-program-1
does not use any other functions for cleanup.

Best Regards,

Ralf Hoffmann

-- 
Ralf Hoffmann <ralf at boomerangsworld.de>
Homepage: http://www.boomerangsworld.de
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dbus-test.c
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20120209/5669bd2f/attachment.asc>


More information about the dbus mailing list