Re: [gdome] gdome_di_createDocFromMemory Memory Leak
- From: "Gustavo Sverzut Barbieri" <barbieri gmail com>
- To: "Himalay Gopu" <Himalay Gopu openwave com>
- Cc: gdome gnome org
- Subject: Re: [gdome] gdome_di_createDocFromMemory Memory Leak
- Date: Thu, 16 Nov 2006 23:25:31 -0200
On 11/16/06, Himalay Gopu <Himalay Gopu openwave com> wrote:
We are developing a threaded module (15 transactions per second) with gdome
and we need to get the xml from memory and parse the same
But when we try to use gdome_di_createDocFromMemory there seems to be a
memory leak almost 6144 bytes for every transaction
The leak starts from here
Some points:
- gdome is not thread safe. while using it in a threaded environment,
I've found some bugs, one of them is creating singletons. I fixed the
one that did hurt at that point, but it was not making it thread safe,
instead I reordered the instructions so it would leak, but not crash.
Anyway, this shouldn't be the case, since the singleton is just
created once, and you may get no more than just few leaks (between:
'create singleton instance' and 'global = singleton-instance')
- gdome uses glib and libxml and they do their own memory management
and do cache. You need to compile these with options like
--enable-gc-friendly and --disable-mem-pool, see Glib user guide and
look at 'running glib applications', something like 'G_SLICER'
then you need to recheck your tests. :-)
--
Gustavo Sverzut Barbieri
--------------------------------------
Jabber: barbieri gmail com
MSN: barbieri gmail com
ICQ#: 17249123
Skype: gsbarbieri
Mobile: +55 (81) 9927 0010
Phone: +1 (347) 624 6296; 08122692 sip stanaphone com
GPG: 0xB640E1A2 @ wwwkeys.pgp.net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]