]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Improve FAQ section discussing statically linked lib
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Wed, 28 Nov 2012 18:12:57 +0000 (18:12 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Wed, 28 Nov 2012 18:12:57 +0000 (18:12 +0000)
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

docs/xml/FAQ.xml

index e0e190bbcbcd4065cbf96eb575077f19941bb9f2..08952cbb693eb95b2ceb3497542b878533210889 100644 (file)
@@ -436,14 +436,25 @@ valgrind-listener 12345
     the manual for more details.</para>
 
     <para>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 <function>malloc</function>, 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 <function>malloc</function>, with their own
+    versions.  By default, statically linked <function>malloc
+    functions</function> are not replaced. A key indicator of this is
+    if Memcheck says:
 <programlisting>
 All heap blocks were freed -- no leaks are possible
 </programlisting>
     when you know your program calls <function>malloc</function>.  The
-    workaround is to avoid statically linking your program.</para>
+    workaround is to use the option 
+    <option>--soname-synonyms=somalloc=NONE</option>
+    or to avoid statically linking your program.</para>
+
+    <para>There will also be no replacement if you use an alternative 
+    <function>malloc library</function> such as tcmalloc, jemalloc,
+    ...  In such a case, the
+    option <option>--soname-synonyms=somalloc=zzzz</option> (where
+    zzzz is the soname of the alternative malloc library) will allow
+    Valgrind to replace the functions.</para>
   </answer>
 </qandaentry>