Introduction

Massif is a member of the valgrind suite of memory-profiling tools. Its purpose is to give a detailed view of dynamic memory usage during the lifetime of the program. Specifically it records the memory use of the heap and the stack.

The heap is the region of memory which is allocated with functions like malloc. It grows on demand and is usually the largest region of memory in a program. The stack is where all the local data for functions is stored. This includes the "automatic" variables in C and the return address for subroutines. The stack is typically a lot smaller and a lot more active than the heap. We won't consider the stack explicitly since Massif treats it as though it were just another part of the heap. Massif also gives information about how much memory is used to manage the heap.

Massif produces two output files: a graphical overview in a postscript file and a detailed breakdown in a text file.