From: Philippe Waroquiers Date: Wed, 28 Nov 2012 18:12:57 +0000 (+0000) Subject: Improve FAQ section discussing statically linked lib X-Git-Tag: svn/VALGRIND_3_9_0~528 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73eaf6f265fdbebccf081697576872e962ba6fc1;p=thirdparty%2Fvalgrind.git Improve FAQ section discussing statically linked lib Valgrind 3.8.1 can work with statically linked lib or alternative malloc libs. Ensure FAQ properly describe this. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13144 --- diff --git a/docs/xml/FAQ.xml b/docs/xml/FAQ.xml index e0e190bbcb..08952cbb69 100644 --- a/docs/xml/FAQ.xml +++ b/docs/xml/FAQ.xml @@ -436,14 +436,25 @@ valgrind-listener 12345 the manual for more details. Second, if your program is statically linked, most Valgrind - tools won't work as well, because they won't be able to replace - certain functions, such as malloc, with their own - versions. A key indicator of this is if Memcheck says: + tools will only work well if they are able to replace certain + functions, such as malloc, with their own + versions. By default, statically linked malloc + functions are not replaced. A key indicator of this is + if Memcheck says: All heap blocks were freed -- no leaks are possible when you know your program calls malloc. The - workaround is to avoid statically linking your program. + workaround is to use the option + + or to avoid statically linking your program. + + There will also be no replacement if you use an alternative + malloc library such as tcmalloc, jemalloc, + ... In such a case, the + option (where + zzzz is the soname of the alternative malloc library) will allow + Valgrind to replace the functions.