|
From: quentin.li <sno...@16...> - 2014-07-22 09:21:53
|
Hi,
I use Codeblocks create a project to do some device operations in my code,
and find that if I use "-static" as linker option, memory leak of the executable file create by Codeblocks won't be detected by valgrind.
Like the memory I malloc that not released by calling free.
But if I close "-static" linker option, all memory leak will be detected again.
I use cmd: "valgrind --tool=memcheck --leak-check=full ./MyProgram".
Can anyone kindly tell me why?
BR
|
|
From: Tom H. <to...@co...> - 2014-07-22 09:35:09
|
On 22/07/14 10:21, quentin.li wrote: > I use Codeblocks create a project to do some device operations in > my code, > and find that if I use "-static" as linker option, memory leak of > the executable file create by Codeblocks won't be detected by valgrind. > Like the memory I malloc that not released by calling free. > But if I close "-static" linker option, all memory leak will be > detected again. > I use cmd: "valgrind --tool=memcheck --leak-check=full .//MyProgram/". > Can anyone kindly tell me why? http://valgrind.org/docs/manual/faq.html#faq.hiddenbug Tom -- Tom Hughes (to...@co...) http://compton.nu/ |