On Linux, I use the data found in /proc/$$/status. I just insert a call to the following function right before the exit. As far as I know Perl does not release the memeory it uses, so this is the maximum size used by the process.
sub total_size { open( STATUS, "/proc/$$/status") or die "cannot find status info i +n /proc/$$/status: $!"; my( $size)= map { m{^VmData:\s+(\d+\s+[\w+])} } <STATUS>; close STATUS; return $size; }
In reply to Re: memory profiling
by mirod
in thread memory profiling
by bronto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |