Proc::ProcessTable currently works on windows, linux, solaris, aix, hpux, freebsd, irix, dec_osf, bsdi, netbsd, unixware 7.x and SunOS.
The windows port requires the Cygwin environment.
use Proc::ProcessTable; print "My memory=", memory_usage(), "\n"; sub memory_usage { my $t = new Proc::ProcessTable; foreach my $got ( @{$t->table} ) { next if not $got->pid eq $$; return $got->size; } }
In reply to Find memory usage of perl program by toma
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |