On linux, one might use the following:
But directly reading the process stats is preferable:sub mem{ `ps -o rss $$` =~ m[(\d+)] }
sub mem { local $/; open my $fh, '/proc/self/status'; <$fh> =~ /^VmRSS:\s*(\d+)/m; }
In reply to Re: time and mem usage of pgm
by Anonymous Monk
in thread time and mem usage of pgm
by carolw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |