Elizabeth Mattijsen (via RT) wrote:
At 16:27 +0000 9/28/03, Eric Garland (via RT) wrote:
use threads;
use threads::shared;
my @shared : shared;
@shared = (1) while (1);
Upon further investigation, it appears that this is _not_ related to
the push / pop problem that existed in 5.8.0. The following code
does _not_ eat memory:
use threads;
use threads::shared;
my @shared : shared;
while (1) {
push( @shared,1 );
pop( @shared );
}
which means that queues (which used to eat memory like hell) are safe
to use. Which is what you would use shared arrays for the most time
anyway. Right?
Aah! Excellent! I was assuming that the push/pop leak and this one were
the same thing but I tried the push/pop test and a queue enqueue/dequeue test
on both cygwin and linux and none of them leaked. It sounds like as long as I
stay away from explicitly setting a shared array my program won't leak in 5.8.1.
I should be able to work around that since most of what I want to do is
enqueue/dequeue type stuff.
Thanks!
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|