Reinstated Memcheck.  Did the full merge from CVS, except for the
user-specified block stuff, which confused me because I wasn't sure whether
to use the code already in SVN, or the code in CVS.  Perhaps that code
doesn't need to be changed.

Unfortunately, Memcheck doesn't work entirely correctly -- I get some
spurious errors.  Nonetheless I'm checking it in as a starting point.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3353 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/addrcheck/ac_main.c b/addrcheck/ac_main.c
index 05a3b5c..5a76af4 100644
--- a/addrcheck/ac_main.c
+++ b/addrcheck/ac_main.c
@@ -1169,9 +1169,9 @@
 /* Leak detector for this tool.  We don't actually do anything, merely
    run the generic leak detector with suitable parameters for this
    tool. */
-static void ac_detect_memory_leaks ( LeakCheckMode mode )
+static void ac_detect_memory_leaks ( ThreadId tid, LeakCheckMode mode )
 {
-   MAC_(do_detect_memory_leaks) ( mode, ac_is_valid_64k_chunk, ac_is_valid_address );
+   MAC_(do_detect_memory_leaks) ( tid, mode, ac_is_valid_64k_chunk, ac_is_valid_address );
 }
 
 
@@ -1235,7 +1235,7 @@
 
    switch (arg[0]) {
       case VG_USERREQ__DO_LEAK_CHECK:
-         ac_detect_memory_leaks(arg[1] ? LC_Summary : LC_Full);
+         ac_detect_memory_leaks(tid, arg[1] ? LC_Summary : LC_Full);
 	 *ret = 0; /* return value is meaningless */
 	 break;