summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorglider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-26 09:41:22 +0000
committerglider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-26 09:41:22 +0000
commitd8b6060f045d93d6b0cfb6a0d8e80fc100df1749 (patch)
treeccf6ca28eae682fab54492718bb303a9aebfc95a /base
parent1fa0c358faf8fef373aca6d30b97c2879539fe9a (diff)
downloadchromium_src-d8b6060f045d93d6b0cfb6a0d8e80fc100df1749.zip
chromium_src-d8b6060f045d93d6b0cfb6a0d8e80fc100df1749.tar.gz
chromium_src-d8b6060f045d93d6b0cfb6a0d8e80fc100df1749.tar.bz2
Add the linux_use_heapchecker GYP variable that should turn the tcmalloc heap
lleak checker on and off. Review URL: http://codereview.chromium.org/1334002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42740 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/allocator/allocator.gyp14
-rw-r--r--base/leak_annotations.h2
2 files changed, 13 insertions, 3 deletions
diff --git a/base/allocator/allocator.gyp b/base/allocator/allocator.gyp
index 0734d2e..b8df28f 100644
--- a/base/allocator/allocator.gyp
+++ b/base/allocator/allocator.gyp
@@ -332,9 +332,19 @@
# Do the same for heap leak checker.
'-Wl,-u_Z21InitialMallocHook_NewPKvj,-u_Z22InitialMallocHook_MMapPKvS0_jiiix,-u_Z22InitialMallocHook_SbrkPKvi',
'-Wl,-u_Z21InitialMallocHook_NewPKvm,-u_Z22InitialMallocHook_MMapPKvS0_miiil,-u_Z22InitialMallocHook_SbrkPKvl',
+ ]},
+ }],
+ [ 'linux_use_heapchecker==0', {
+ # Do not compile and link the heapchecker source.
+ 'sources!': [
+ '<(tcmalloc_dir)/src/heap-checker-bcad.cc',
+ '<(tcmalloc_dir)/src/heap-checker.cc',
],
- },
- }],
+ # Disable the heap checker in tcmalloc.
+ 'cflags': [
+ '-DNO_HEAP_CHECK',
+ ],
+ }],
],
},
{
diff --git a/base/leak_annotations.h b/base/leak_annotations.h
index 8b5c2ad..a402acf 100644
--- a/base/leak_annotations.h
+++ b/base/leak_annotations.h
@@ -7,7 +7,7 @@
#include "build/build_config.h"
-#if defined(OS_LINUX) && defined(USE_TCMALLOC)
+#if defined(OS_LINUX) && defined(USE_HEAPCHECKER)
#include "third_party/tcmalloc/chromium/src/google/heap-checker.h"