Approach 1: run a process with massif, let it take automatic memory snapshots and then analyze the results
Approach 2: run a process with massif, manually decide when the snapshots are taken, and then analyze the results
-
- Run your process with massif:
valgrind --tool=massif <your executable> <your process arguments>
- Run your process with massif:
-
- Do whatever you need to do, and then stop your process. A file named ms_print massif.out.pid will be generated.
- 3a. Option 1: Run
ms_print massif.out.*pid* > user_friendly.txt
to generate a user-friendly file and analyze it. - 3b. Option 2: Run
massif-visualizer massif.out.*pid*
to visualize the results in a pretty UI. You need to install massif-visualizer:sudo apt install massif-visualizer