|
From: Shinni <pcs...@ni...> - 2005-03-18 16:57:34
|
Hi, I have a doubt similar to Dimitri's qn. Can i use valgrind for profiling memory usage ? is there any option in memcheck tool to know how much memory/swap space a process is used for its entire execution ? ( Like $time -f "%k" process , to know a process's memory usage? time command gives me no result in my system) When i run valgrind memcheck tool for my program , i get the folowing malloc related output (as in everyone's case).. ==2665== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 15 from 1) ==2665== malloc/free: in use at exit: 3738920 bytes in 79 blocks. ==2665== malloc/free: 6826 allocs, 6747 frees, 7862936 bytes allocated. ==2665== For a detailed leak analysis, rerun with: --leak-check=yes ==2665== For counts of detected errors, rerun with: -v Here , does the third line mean that the program used malloc 6826 times and during its execution time , 7862 KB is allocated ? Are there any guidelines to interpret the output valgrind gives? ( I'm a newbie * :( * ) I wanted to use valgrind for perfomance analysis of my programs. Is the info i get like above is sufficient for this ? or is there any other way ? Thank you for your time Regards shinni |