Subject: | memory leak |
I'm having a memory leak using Text::Iconv.
System : Debian, Sid
I tried with the provided package (libtext-iconv-perl 1.4-3) and
compiling it myself (1.7).
my libc6 is : 2.7-2
Perl is : v5.8.8
OS is : Linux postgres-isr 2.6.18-1-xen-amd64 #1 SMP Sat Oct 21
19:25:12 CEST 2006 x86_64 GNU/Linux (also reproduced with Linux
2.6.23-1-686 #1 SMP Mon Nov 19 01:08:26 UTC 2007 i686 GNU/Linux)
Here's the code :
#!/usr/bin/perl
use Text::Iconv;
$converter = Text::Iconv->new("iso8859-1", "utf8");
while(1)
{
$converted = $converter->convert("Text to convert");
}
Here, the memory usage is skyrocketing when doing this. Of course,
this is not the real code, but when converting a big stream, the
memory leak is very big (my process goes well over 3GB of memory used)