|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Re: [gnome] gdome_di_createDocFromMemory Memory LeakThanks Gustavo
We have a function which creates the singleton for every transaction and processes the XML so this should be causing the leak -- AM I RIGHT BTW what are the singleton classes in gdome -- GdomeDOMImplementation Does making these classes singleton hinder the performance of the application in threaded environment? I will try out recompiling the libs and test Thanks Himalay -----Original Message----- From: Gustavo Sverzut Barbieri [mailto:barbieri@...] Sent: Thursday, November 16, 2006 8:26 PM To: Himalay Gopu Cc: gdome@... Subject: Re: [gdome] gdome_di_createDocFromMemory Memory Leak On 11/16/06, Himalay Gopu <Himalay.Gopu@...> 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@... MSN: barbieri@... ICQ#: 17249123 Skype: gsbarbieri Mobile: +55 (81) 9927 0010 Phone: +1 (347) 624 6296; 08122692@... GPG: 0xB640E1A2 @ wwwkeys.pgp.net _______________________________________________ gdome mailing list gdome@... http://mail.gnome.org/mailman/listinfo/gdome |
|
|
Re: [gnome] gdome_di_createDocFromMemory Memory LeakOn 11/16/06, Himalay Gopu <Himalay.Gopu@...> wrote:
> Thanks Gustavo > > We have a function which creates the singleton for every transaction and > processes the XML so this should be causing the leak -- AM I RIGHT weird... how are you creatinga singleton for every transaction? Singletons should be... singletons, single instances. > BTW what are the singleton classes in gdome -- GdomeDOMImplementation > Does making these classes singleton hinder the performance of the > application in threaded environment? the singletons here are just the vtable stuff, used to dispatch the methods. It could be done in other ways, like static or even better gdome guys could use c++ and let compiler does that. -- Gustavo Sverzut Barbieri -------------------------------------- Jabber: barbieri@... MSN: barbieri@... ICQ#: 17249123 Skype: gsbarbieri Mobile: +55 (81) 9927 0010 Phone: +1 (347) 624 6296; 08122692@... GPG: 0xB640E1A2 @ wwwkeys.pgp.net _______________________________________________ gdome mailing list gdome@... http://mail.gnome.org/mailman/listinfo/gdome |
| Free embeddable forum powered by Nabble | Forum Help |