Skip to content
Archive of entries posted on June 2010

Measuring memory usage with strace

In the tradition of abusing high-level Linux tools to produce useful low-level data, I present a method for estimating peak memory usage in Linux by text-processing the output from strace: measure-memory This Perl script invokes an arbitrary command via strace. It adds up memory allocated by mmap2() with no location hint and the file handle […]