Вопрос

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 ?

Это было полезно?

Решение

Другие советы

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)

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top