develooper Front page | perl.perl5.porters | Postings from March 2003

5.8.1@19053: threads goofs ][

Thread Next
Ilya Zakharevich
March 31, 2003 13:38
5.8.1@19053: threads goofs ][
Message ID:
Forgot to mention it:

threads leaks 7 4-byte buckets and 5 12-byte buckets per
created/joined thread.  Easy to see comparing the results of

  env PERL_DEBUG_MSTATS=2 perl -Mthreads -Mthreads::shared -we "for (1.. 2){my @t; push @t, threads->new(sub{}) for 1..25; $_->join for @t}"


  env PERL_DEBUG_MSTATS=2 perl -Mthreads -Mthreads::shared -we "for (1..42){my @t; push @t, threads->new(sub{}) for 1..25; $_->join for @t}"

[I checked with -DDEBUGGING perl, which does not distinguish 8-byte
buckets and 12-byte buckets; there may be a finer report from
non-debugging perl.]

[And one of my previous messages today refered to 'threads' module as
'thread'; sorry for a confusion.]

Hope this helps,

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About