Thursday, May 29, 2008

Q:How to use valgrind to detect the memory leak in sub-function?


Today I use the valgrind to find the memory leak in my application.
But it just gives me such information:
==4323==
==4323== 856,984 bytes in 2 blocks are indirectly lost in loss record
7 of 7
==4323== at 0x4021259: malloc (in /usr/lib/valgrind/x86-linux/
vgpreload_memcheck.so)
==4323== by 0x403ADB9: icvDefaultAlloc(unsigned, void*)
(cxalloc.cpp:49)
==4323== by 0x804A95F: main (liuIpm_biLinear.cpp:72)
==4323==

Here liuIpm_biLinear.cpp is sub-function which was used in main(). I
can't get the information about the wrong position in subfunction.


Liu

No comments: