Skip Menu |
 

This queue is for tickets about the XML-LibXML CPAN distribution.

Report information
The Basics
Id: 526
Status: resolved
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: zoonek [...] math.jussieu.fr
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.40
Fixed in: (no value)



Subject: Memory leak while processing many files with DOM
Download (untitled) / with headers
text/plain 711b
The following program takes an ever growing amount of memory, while the memory should be freed at each iteration. #! perl -w use strict; use XML::LibXML; for(my $i=0; $i<1_000_000; $i++){ my $entry = "<entry><sense></sense><sense></sense></entry>"; my $parser = new XML::LibXML; my $doc = $parser->parse_string($entry); my $root = $doc->getDocumentElement; my $g = 0; # The memory leak comes from the following line foreach my $sense (@{ $root->getElementsByTagName("sense") }){ $g++ } } Perl version: 5.6.1 XML-LibXML version: 1.40 Operating system: % uname -a Linux borel5.institut.math.jussieu.fr 2.4.2-2smp #1 SMP Sun Apr 8 20:21:34 EDT 2001 i686 unknown
Download (untitled) / with headers
text/plain 818b
On חמישי אפריל 25 14:13:33 2002, guest wrote: Show quoted text
> The following program takes an ever growing amount of memory, > while the memory should be freed at each iteration. > > #! perl -w > use strict; > use XML::LibXML; > > for(my $i=0; $i<1_000_000; $i++){ > my $entry = "<entry><sense></sense><sense></sense></entry>"; > my $parser = new XML::LibXML; > my $doc = $parser->parse_string($entry); > my $root = $doc->getDocumentElement; > > my $g = 0; > # The memory leak comes from the following line > foreach my $sense (@{ $root->getElementsByTagName("sense") }){ > $g++ } > } > > Perl version: 5.6.1 > XML-LibXML version: 1.40 > Operating system: > % uname -a > Linux borel5.institut.math.jussieu.fr 2.4.2-2smp #1 SMP Sun Apr 8 > 20:21:34 EDT 2001 i686 unknown


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.