Subject: | Memory problem with Archive::Tar |
Date: | Wed, 25 Feb 2009 15:16:41 +0100 |
To: | <bug-Archive-Tar [...] rt.cpan.org> |
From: | "Sietse Rispens" <S.M.Rispens [...] sron.nl> |
Dear developers,
In the perl scripts that I use I see a problem with memory management in Archive::Tar. It seems that memory is not returned after usage. See also http://www.perlmonks.org/?node_id=739495.
Please find attached a scripts with which I can generate the error "Out of memory!" on my PC. The script creates an archive with a text file. After that it iterates to create, extract and clear an Archive::Tar object for the archive. The script takes two arguments, the first is the size of the textfile to be created in megabytes, the second the maximum number of iterations. If the size of the text file is chosen correctly, it generates on my PC the "Out of memory!" error after a few iterations (80MB no error, 90 MB in the 4th iteration, 100MB in the 2nd iteration, 150MB and more in the first iteration, so the choice comes rather precise).
About my system, it is debian lenny, with 1 GB memory.
Show quoted text
>> perl -v
This is perl, v5.10.0 built for i486-linux-gnu-thread-multi
Show quoted text>> uname -a
Linux horizon 2.6.22.6 #1 SMP Wed Oct 10 15:10:49 CEST 2007 i686 GNU/Linux
Show quoted text>> perl -mArchive::Tar -e 'print $Archive::Tar::VERSION."\n"'
1.38
On a different machine with Archive::Tar version 1.44 I saw the same problem.
I hope this information is enough to identify the problem.
Best regards,
Sietse Rispens
----
Sietse Rispens
SRON Netherlands Institute for Space Research
Earth Oriented Science Division
s.m.rispens@sron.nl
+31 (0)30 253 5646
Message body is not shown because sender requested not to inline it.