http://www.perlmonks.org?node_id=598067


in reply to How to tell if script sucks...memory

As you mention Debian (a GNU/Linux distro), I'll throw in my .02$: check out the Linux namespace on CPAN. You'll find lots of Linux specific packages that could leverage your fiddlings. For instance, one module I personally tend to overuse from time to time is Linux::Smaps. Here's a sample usage:
$ perl -MLinux::Smaps -le '$sm = Linux::Smaps->new($$); \ sub psize { $sm->update; print $sm->size; } \ psize(); require POSIX; psize(); POSIX->import; psize();' 6312 6560 7088
If you want something even more fancy, try GTop. Here's a sample usage:
$ perl -MGTop -le '$gtop = GTop->new; \ sub psize { print $gtop->proc_mem($$)->size; } \ psize(); require POSIX; psize(); POSIX->import; psize();' 7839744 7958528 8499200
--
AltBlue.