aboutsummaryrefslogtreecommitdiffstats
path: root/testing/chromium/chromium-tcmalloc.patch
blob: 3674d1ee4eb7b2151cf18b31e91794ca7ecd2d6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
--- chromium-13.0.754.0.orig/third_party/tcmalloc/chromium/src/symbolize.cc
+++ chromium-13.0.754.0/third_party/tcmalloc/chromium/src/symbolize.cc
@@ -86,7 +86,7 @@
   return 0;   // TODO(csilvers): get argv[0] somehow
 #else
   // All this work is to do two-way communication.  ugh.
-  extern char* program_invocation_name;  // gcc provides this
+  extern const char* program_invocation_name;  // gcc provides this
   int *child_in = NULL;   // file descriptors
   int *child_out = NULL;  // for now, we don't worry about child_err
   int child_fds[5][2];    // socketpair may be called up to five times below
--- chromium-13.0.754.0.orig/third_party/tcmalloc/chromium/src/tcmalloc.cc
+++ chromium-13.0.754.0/third_party/tcmalloc/chromium/src/tcmalloc.cc
@@ -213,8 +213,6 @@
   void* tc_pvalloc(size_t __size) __THROW
       ATTRIBUTE_SECTION(google_malloc);
 
-  void tc_malloc_stats(void) __THROW
-      ATTRIBUTE_SECTION(google_malloc);
   int tc_mallopt(int cmd, int value) __THROW
       ATTRIBUTE_SECTION(google_malloc);
 #ifdef HAVE_STRUCT_MALLINFO    // struct mallinfo isn't defined on freebsd
@@ -285,7 +283,6 @@
   void* pvalloc(size_t size) __THROW             ALIAS("tc_pvalloc");
   int posix_memalign(void** r, size_t a, size_t s) __THROW
       ALIAS("tc_posix_memalign");
-  void malloc_stats(void) __THROW                ALIAS("tc_malloc_stats");
   int mallopt(int cmd, int value) __THROW        ALIAS("tc_mallopt");
 #ifdef HAVE_STRUCT_MALLINFO
   struct mallinfo mallinfo(void) __THROW         ALIAS("tc_mallinfo");
@@ -322,7 +319,6 @@
   int posix_memalign(void** r, size_t a, size_t s) __THROW {
     return tc_posix_memalign(r, a, s);
   }
-  void malloc_stats(void) __THROW                { tc_malloc_stats();         }
   int mallopt(int cmd, int v) __THROW            { return tc_mallopt(cmd, v); }
 #ifdef HAVE_STRUCT_MALLINFO
   struct mallinfo mallinfo(void) __THROW         { return tc_mallinfo();      }
@@ -1232,10 +1228,6 @@
 
 // Helpers for use by exported routines below:
 
-inline void do_malloc_stats() {
-  PrintStats(1);
-}
-
 inline int do_mallopt(int cmd, int value) {
   return 1;     // Indicates error
 }
@@ -1535,10 +1527,6 @@
   void* result = do_memalign_or_cpp_memalign(pagesize, size);
   MallocHook::InvokeNewHook(result, size);
   return result;
-}
-
-extern "C" PERFTOOLS_DLL_DECL void tc_malloc_stats(void) __THROW {
-  do_malloc_stats();
 }
 
 extern "C" PERFTOOLS_DLL_DECL int tc_mallopt(int cmd, int value) __THROW {