How to profile memory usage?

math picture math · Jan 14, 2011 · Viewed 33.7k times · Source

I am aware of Valgrind, but it just detects memory management issues. What I am searching is a tool that gives me an overview, which parts of my program do consume how much memory. A graphical representation with e.g. a tree map (as KCachegrind does for Callgrind) would be cool.

I am working on a Linux machine, so windows tools will not help me very much.

Answer

ismail picture ismail · Jan 14, 2011

Use massif, which is part of the Valgrind tools. massif-visualizer can help you graph the data or you can just use the ms_print command.