summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-12 15:57:51 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-12 15:57:51 +0000
commit6033af3b77d7c40fcdb1c80ac77d4e49ba8236c3 (patch)
tree879a0f5cfbb4afa18ca6daa056be702969ff3884 /base
parent63aa10cf7c1a00ad84470a970c7351402ce2859e (diff)
downloadchromium_src-6033af3b77d7c40fcdb1c80ac77d4e49ba8236c3.zip
chromium_src-6033af3b77d7c40fcdb1c80ac77d4e49ba8236c3.tar.gz
chromium_src-6033af3b77d7c40fcdb1c80ac77d4e49ba8236c3.tar.bz2
Revert 77941 - Add redundancy to detect double frees in TCMalloc
I'll land and revert this quickly, to see what impact it has on performance. Added a single byte or word (tranparently) to all allocations, and wrote a unique value into that location after each allocation. When free() is called, we validate the flag, and then mark the block as not being allocated. Any time a block fails to validate, we crash, as this means the object either overran its allocated region (or suffered memory corruption), or else (more likely) a double free took place. We have two distinct crash stacks for the two distinct validation problems (corrupt vs double free). TBR=mbelshe Review URL: http://codereview.chromium.org/6679021 TBR=jar@chromium.org Review URL: http://codereview.chromium.org/6679029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77942 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/allocator/allocator_shim.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/base/allocator/allocator_shim.cc b/base/allocator/allocator_shim.cc
index 0bee3d3..f11164c 100644
--- a/base/allocator/allocator_shim.cc
+++ b/base/allocator/allocator_shim.cc
@@ -41,7 +41,7 @@ typedef enum {
// See SetupSubprocessAllocator() to specify a default secondary (subprocess)
// allocator.
// TODO(jar): Switch to using TCMALLOC for the renderer as well.
-static Allocator allocator = TCMALLOC;
+static Allocator allocator = WINHEAP;
// The names of the environment variables that can optionally control the
// selection of the allocator. The primary may be used to control overall