in reply to Re^2: When to use forks, when to use threads ...?
in thread When to use forks, when to use threads ...?
I didn't wait to let the system really slowdown, but stopped when it became obvious that swapping would have to start.[...] my $size; open PIPE, "/bin/ps wwaxo 'pid,rss' |"; while(<PIPE>) { next unless /^\s*$$\s/; s/^\s+//g; chomp; $size = (split(' ', $_))[1]; } close PIPE; return $size; }
|
---|