smaps: A quick memory analysis

Post by Nico Brailovsky @ 2016-02-18 | Permalink | Leave a comment

Many times you see your process' memory consumption skyrocketing even though you're quite certain you have no memory leaks. This usually marks for the beginning of a very lengthy debugging process with valgrind or a similar tool, but even so some times you might get stuck trying to debug some third party library.

There's a quick tip in Linux that can help you track down a lib gone haywire:

cat /proc//smaps

smaps will report every mapped section of memory for a certain process, how big the memory allocation is and which binary created the allocation.