Memeory leak when sending a new dbus signal
Priya Raghavendra
Priya_Raghavendra at mindtree.com
Fri Jun 12 04:07:45 PDT 2009
Hi,
What we noticed on our application is that every time we create a new signal and send it, the memory utilization by the dbus-deamon increases, the application memory utilization is almost the same.
We are running this create signal is a loop and we see an exponential increase in memory utilization in the daemon, for e.x. from few kb to about 10MB!
Thanks,
Priya
________________________________
From: Naveen Verma [mailto:ernaveenverma at gmail.com]
Sent: Friday, June 12, 2009 3:25 PM
To: Priya Raghavendra
Subject: Re: Memeory leak when sending a new dbus signal
On Fri, Jun 12, 2009 at 12:29 PM, Priya Raghavendra <Priya_Raghavendra at mindtree.com<mailto:Priya_Raghavendra at mindtree.com>> wrote:
Yes we are using this iterator when we receive a signal. I have just taken out the main steps from our code and sent it.
You think there is a problem when using this iterator?
-- No no, I just thought it that the reason for leak. In the above code snippet, I am unable to find the reason for leak, and you are not leaking the memory for any string argument, because we need to free them by our self?
-Br
Naveen
________________________________
From: Naveen Verma [mailto:ernaveenverma at gmail.com<mailto:ernaveenverma at gmail.com>]
Sent: Friday, June 12, 2009 1:47 PM
To: Priya Raghavendra
Cc: dbus at lists.freedesktop.org<mailto:dbus at lists.freedesktop.org>
Subject: Re: Memeory leak when sending a new dbus signal
Hi,
DBusMessage *msg;
DBusMessageIter args;
/* create a signal & check for errors */
msg = dbus_message_new_signal(ObjectName, // object name of the signal
InterfaceName, // interface name of the signal
MessageName); // name of the signal
if (NULL == msg)
{
fprintf(stderr, "Message Null\n");
}
dbus_message_iter_init(msg, &args);
--- Are you using this iterator?
// send the message and flush the connection
if (!dbus_connection_send(conn, msg, &serial))
{
fprintf(stderr, "Out Of Memory!\n");
exit(1);
}
dbus_connection_flush(conn);
dbus_message_unref(msg);
-- Br
Naveen
________________________________
http://www.mindtree.com/email/disclaimer.html
_______________________________________________
dbus mailing list
dbus at lists.freedesktop.org<mailto:dbus at lists.freedesktop.org>
http://lists.freedesktop.org/mailman/listinfo/dbus
________________________________
http://www.mindtree.com/email/disclaimer.html
________________________________
http://www.mindtree.com/email/disclaimer.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20090612/35eef276/attachment-0001.htm
More information about the dbus
mailing list