in reply to Memory Profiling

Perl has Dan Sugalski's Devel::Size, which appears to do an excellent job of reporting memory usage of individual variables as well as more complex data structures. It's good for when one suspects a certain variable is getting a little too large, but does not provide a way to gain a snapshot into Perl's overall memory usage.

If you're looking to determine an aggregate size for your program perhaps taking a look at the guts of Apache::SizeLimit might yield some useful techniques.

perrin wrote that module IIRC, and it has some methods for returning process sizes on different platforms.