I\'m profiling my software using valgrind tool massif with parameters like this:
valgrind.bin --tool=massif --massif-out-file=massif.out.%p --xtree-memory=full