Re: [xml] =?iso-8859-1?q?=BFleak_using_libxml2_for_sax-parsing_html_i?= =?iso-8859-1?q?n_python=3F?=

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.

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

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


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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