June 21, 2004

Analyzing memory in Perl

What to do about the "out of memory" error? There are two Perl-specific ways to analyze memory usage: $ENV{PERL_DEBUG_MSTATS} and -DL command-line switch. The first is available only if Perl is compiled with Perl's malloc(); the second only if Perl was built with -DDEBUGGING. Hmmm...

Update
I couldn't do what I wanted to do with either of these methods. I ended up using 'ps', as in 'ps -lp $$', to get the amount of memory being used by the process at important points in my code. Fortunately I was able to figure out the problem, but that's another story for another day.

Posted by torque at June 21, 2004 4:12 PM | TrackBack
Comments
Post a comment









Remember personal info?