Re: [xml] RelaxNG : Unfreed Memory



On Wed, Jan 11, 2006 at 02:09:02PM -0500, Jean-Francois Dupont-Viel (QC/EMC) wrote:
Hi all,

We have been running our application using purify and there is some
unfreed memory left here and there Here's what we found : 

MIU: 1920 bytes in-use at 0x1007775e8
  * This memory was allocated from:
        malloc
[/src/ipse/users/lmcviel/build/clf/clfd/bin/SunOS_sun4u_noopt_purify/rtl
ib.o]
        xmlHashCreate  [/tmp/libxml2.7556/libxml2-2.6.22/hash.c:156]
        xmlSchemaInitTypes
[/tmp/libxml2.7556/libxml2-2.6.22/xmlschemastypes.c:388]
        xmlSchemaGetPredefinedType

  Seems you didn't cleaned up the memory used by global data in the library
after usage. Compile with memory debug, use xmllint to reproduce the bug and
check the .memdump after validating with relaxng. If the leak show up
in your code and not with xmllint, that mean your code has a bug. In that
case I bet you forgot to call xmlCleanupParser() when done using libxml2.
   http://xmlsoft.org/xmlmem.html

Daniel

-- 
Daniel Veillard      | Red Hat http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]