summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-24 00:30:02 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-24 00:30:02 +0000
commit03baa08e42c7f4dd4f84ee573fa4fc7aa1281965 (patch)
tree07495d72116cb60b053f0a5da2b739d6e3f52803 /third_party
parent5815d4cbab80b2b1291e64eda3d12e5975fff939 (diff)
downloadchromium_src-03baa08e42c7f4dd4f84ee573fa4fc7aa1281965.zip
chromium_src-03baa08e42c7f4dd4f84ee573fa4fc7aa1281965.tar.gz
chromium_src-03baa08e42c7f4dd4f84ee573fa4fc7aa1281965.tar.bz2
Switch to using WinHeap for the browser process
Disabled the TCMalloc double-free detection, which should restore much of the performance loss caused by this experiment (to find double frees, if any). This should resolve bug 76640 As an alternate experiment to better illuminate our memory corruption problem, this CL also enables WinHeap (default Windows allocator) in the browser process. There is a chance that this will cause a very tiny reduction in performance, but it will surely increase our crash rate (based on what we saw recently on the dev channel). BUG=76640 r=rtenneti Review URL: http://codereview.chromium.org/6705027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79224 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r--third_party/tcmalloc/chromium/src/tcmalloc.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/third_party/tcmalloc/chromium/src/tcmalloc.cc b/third_party/tcmalloc/chromium/src/tcmalloc.cc
index f6bb50c..e702256 100644
--- a/third_party/tcmalloc/chromium/src/tcmalloc.cc
+++ b/third_party/tcmalloc/chromium/src/tcmalloc.cc
@@ -1611,11 +1611,15 @@ void *(*__memalign_hook)(size_t, size_t, const void *) = MemalignOverride;
// 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).
-#define TCMALLOC_VALIDATION
+// 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
+// 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
#if !defined(TCMALLOC_VALIDATION)
-static size_t ExcludeSpaceForMark(size_t size) { return size; (}
+static size_t ExcludeSpaceForMark(size_t size) { return size; }
static void AddRoomForMark(size_t* size) {}
static void ExcludeMarkFromSize(size_t* new_size) {}
static void MarkAllocatedRegion(void* ptr) {}