Reputation: 43
I'm developing C module for php under linux and I'm trying to find a way that could help me profile my code by maximum memory spike (usage).
Using valgrind I can get total memory allocation within the code. But as it is with allocated memory it comes and goes ;). What I need to get is the highest memory usage that appeared during C application run so I could get total overview on memory requirements and have some measurement point for optimization of the code.
Does anyone know any tool/trick/good practice that could help ?
Upvotes: 4
Views: 1616
Reputation: 1154
Have you checked massif (one of Valgrind's tool)? this is actually what you are looking for
another possibility would be memusage (one of glibc's utilities, glibc-utils)
Upvotes: 0
Reputation: 6319
Take a look at Massif: http://valgrind.org/docs/manual/ms-manual.html
Upvotes: 5