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

Side by Side Diff: base/allocator/allocator_shim.cc

Issue 11360002: A Speculative Revert for 164939 - Use tcmalloc's debugallocation for Debug builds (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/allocator/allocator.gyp ('k') | base/allocator/debugallocation_shim.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/allocator/allocator_shim.h" 5 #include "base/allocator/allocator_shim.h"
6 6
7 #include <config.h> 7 #include <config.h>
8 #include "base/allocator/allocator_extension_thunks.h" 8 #include "base/allocator/allocator_extension_thunks.h"
9 #include "base/profiler/alternate_timer.h" 9 #include "base/profiler/alternate_timer.h"
10 #include "base/sysinfo.h" 10 #include "base/sysinfo.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 // The names of the environment variables that can optionally control the 50 // The names of the environment variables that can optionally control the
51 // selection of the allocator. The primary may be used to control overall 51 // selection of the allocator. The primary may be used to control overall
52 // allocator selection, and the secondary can be used to specify an allocator 52 // allocator selection, and the secondary can be used to specify an allocator
53 // to use in sub-processes. 53 // to use in sub-processes.
54 static const char primary_name[] = "CHROME_ALLOCATOR"; 54 static const char primary_name[] = "CHROME_ALLOCATOR";
55 static const char secondary_name[] = "CHROME_ALLOCATOR_2"; 55 static const char secondary_name[] = "CHROME_ALLOCATOR_2";
56 56
57 // We include tcmalloc and the win_allocator to get as much inlining as 57 // We include tcmalloc and the win_allocator to get as much inlining as
58 // possible. 58 // possible.
59 #include "debugallocation_shim.cc" 59 #include "tcmalloc.cc"
60 #include "win_allocator.cc" 60 #include "win_allocator.cc"
61 61
62 // Forward declarations from jemalloc. 62 // Forward declarations from jemalloc.
63 extern "C" { 63 extern "C" {
64 void* je_malloc(size_t s); 64 void* je_malloc(size_t s);
65 void* je_realloc(void* p, size_t s); 65 void* je_realloc(void* p, size_t s);
66 void je_free(void* s); 66 void je_free(void* s);
67 size_t je_msize(void* p); 67 size_t je_msize(void* p);
68 bool je_malloc_init_hard(); 68 bool je_malloc_init_hard();
69 void* je_memalign(size_t a, size_t s); 69 void* je_memalign(size_t a, size_t s);
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 void TCMallocDoFreeForTest(void* ptr) { 436 void TCMallocDoFreeForTest(void* ptr) {
437 do_free(ptr); 437 do_free(ptr);
438 } 438 }
439 439
440 size_t ExcludeSpaceForMarkForTest(size_t size) { 440 size_t ExcludeSpaceForMarkForTest(size_t size) {
441 return ExcludeSpaceForMark(size); 441 return ExcludeSpaceForMark(size);
442 } 442 }
443 443
444 } // namespace allocator. 444 } // namespace allocator.
445 } // namespace base. 445 } // namespace base.
OLDNEW
« no previous file with comments | « base/allocator/allocator.gyp ('k') | base/allocator/debugallocation_shim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698