Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Unified Diff: third_party/tcmalloc/chromium/src/tcmalloc.cc

Issue 7976011: Enable tcmalloc validation by default in debug builds (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tcmalloc/chromium/src/tcmalloc.cc
diff --git a/third_party/tcmalloc/chromium/src/tcmalloc.cc b/third_party/tcmalloc/chromium/src/tcmalloc.cc
index 4afe5e7193b4df0195b027639a2f80d48ef873c9..51fe5b31ecd17639e6e58b0d1ec60a66c01cb333 100644
--- a/third_party/tcmalloc/chromium/src/tcmalloc.cc
+++ b/third_party/tcmalloc/chromium/src/tcmalloc.cc
@@ -1791,11 +1791,13 @@ void *(*__MALLOC_HOOK_VOLATILE __memalign_hook)(size_t, size_t, const void *) =
// to be hashed encoding of the location, so that they can't be copied over a
// different region (by accident) without being detected (most of the time).
-// Uncomment the following define to turn on all the TCMalloc checking.
-// It will cost abotu 2% in performance, but it will catch double frees (most of
+// Enable the following define to turn on all the TCMalloc checking.
+// It will cost about 2% in performance, but it will catch double frees (most of
// the time), and will often catch allocated-buffer overrun errors. This
// validation is only active when TCMalloc is used as the allocator.
-// #define TCMALLOC_VALIDATION
+#ifndef NDEBUG
+#define TCMALLOC_VALIDATION
+#endif
#if !defined(TCMALLOC_VALIDATION)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698