Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
After starting the 50 threads the program consumes approx 18 mb of memory, after the threads ended this is slightly reduced to 17 (running perl 5.8.4 on a linux machine). Anyone can help me with that?use threads; my $i=1; while($i<=50){ my $thr = threads->new(\&lwp); $thr->detach(); print $i++, "\n"; sleep(1); }; sleep(); sub lwp { sleep(60); print threads->tid." ended\n"; return 1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Memory consumption with
by tirwhan (Abbot) on Nov 29, 2005 at 14:47 UTC | |
|
Re: Memory consumption with
by Fletch (Bishop) on Nov 29, 2005 at 15:05 UTC | |
|
Re: Memory consumption with
by zentara (Cardinal) on Nov 29, 2005 at 16:48 UTC |