title: Measuring peak memory usage of Perl process with Valgrind
body: <p>I'm trying to determine the peak (heap) memory usage of a Perl script using Valgrind:</p>
  
  <pre><code>valgrind --tool=massif --depth=1 /usr/bin/perl script.pl arguments
  </code></pre>
  
  <p>Valgrind seems to start up just fine, the script executes, but no <code>massif.out.PID</code> file is generated. I've successfully used the same kind of command with C and Lua programs but for some reason it doesn't seem to work with this Perl script.</p>
  
  <p><em>I'm on Mac OS 10.6.6, my Perl is the system standard <code>v5.10.0 built for darwin-thread-multi-2level</code> and my Valgrind is 3.6.1 (from MacPorts).</em></p>