summaryrefslogtreecommitdiffstats
path: root/base/allocator/debugallocation_shim.cc
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-07 23:33:43 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-07 23:33:43 +0000
commite1bc6c35121a7dd50d6cde85f15a4794bd8efec1 (patch)
tree0d163c02f37df8d2367b64de0de5200aba7c807c /base/allocator/debugallocation_shim.cc
parentc5e288381ef30a847e5458b82c80a9d1a4db2126 (diff)
downloadchromium_src-e1bc6c35121a7dd50d6cde85f15a4794bd8efec1.zip
chromium_src-e1bc6c35121a7dd50d6cde85f15a4794bd8efec1.tar.gz
chromium_src-e1bc6c35121a7dd50d6cde85f15a4794bd8efec1.tar.bz2
Use tcmalloc's debugallocation for Debug builds
to catch memory problems early, easily, and cleanly. Because of gyp limitations, this can't be now controlled by a flag. BUG=30715 TEST=none Review URL: https://codereview.chromium.org/11266019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166547 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/allocator/debugallocation_shim.cc')
-rw-r--r--base/allocator/debugallocation_shim.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/base/allocator/debugallocation_shim.cc b/base/allocator/debugallocation_shim.cc
new file mode 100644
index 0000000..d1cf52a
--- /dev/null
+++ b/base/allocator/debugallocation_shim.cc
@@ -0,0 +1,9 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#if defined(TCMALLOC_FOR_DEBUGALLOCATION)
+#include "third_party/tcmalloc/chromium/src/debugallocation.cc"
+#else
+#include "third_party/tcmalloc/chromium/src/tcmalloc.cc"
+#endif