On Fri, Jan 05, 2007 at 04:06:57PM +0100, Cesar Ortiz wrote:
> Hi all,
> 
> I am using libxml2 for parsing html in python. I was thinking that libxml2
> could be involved, so I modified one of the website python examples in order
> to process a revelant number of html files while I checked the memory
> comsuption with the top command.

  Which is just a very wrong way to try to assert memory leak.

> And... yes! the program does increase the memory consumption till it finish.

  Can be perfectly normal to some point.

> libxml2.cleanupParser()
> if libxml2.debugMemory(1) == 0:
>    print "OK"
> else:
>    print "Memory leak %d bytes" % (libxml2.debugMemory(1))
>    libxml2.dumpMemory()

Libxml2 wise that's the only serious way to check for leaks, check that output.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to