Memory leak with shared memory

[email protected] (Adrien)
Newsgroups perl.ithreads
Message-ID <[email protected]>
Hello,

I have a "big" problem with threads and shared memory.

Example :
#!/usr/bin/perl

use threads;
use threads::shared;

my $char_test : shared;
$char_test = "A";

for (my $i = 0; $i < 25; $i++)
{
    $char_test .= $char_test;
}

print "done\n";

sleep 5;

print "undef\n";
undef($char_test);
print "undef done\n";

sleep 60;

If I comment "use threads;", all is ok (memory usage is about 3.5% and
after undef, about 0.1%). But, if I uncomment "use threads;", memory usage
of perl is double (7%) and after undef, memory usage is 3.5%...
You can see that with "ps auxw".

It's a big problem for my project. Somebody knows this problem ?

Thanks,
Adrien
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.