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

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

Issue 9667026: Revert 126020 - Experiment for updating the tcmalloc chromium branch to r144 (gperftools 2.0). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | « third_party/tcmalloc/chromium/src/static_vars.h ('k') | third_party/tcmalloc/chromium/src/symbolize.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tcmalloc/chromium/src/static_vars.cc
===================================================================
--- third_party/tcmalloc/chromium/src/static_vars.cc (revision 126022)
+++ third_party/tcmalloc/chromium/src/static_vars.cc (working copy)
@@ -34,7 +34,6 @@
#include <stddef.h> // for NULL
#include <new> // for operator new
#include "internal_logging.h" // for CHECK_CONDITION
-#include "common.h"
#include "sampler.h" // for Sampler
namespace tcmalloc {
@@ -47,7 +46,7 @@
Span Static::sampled_objects_;
PageHeapAllocator<StackTraceTable::Bucket> Static::bucket_allocator_;
StackTrace* Static::growth_stacks_ = NULL;
-PageHeap* Static::pageheap_ = NULL;
+char Static::pageheap_memory_[sizeof(PageHeap)];
void Static::InitStaticVars() {
sizemap_.Init();
@@ -61,11 +60,7 @@
for (int i = 0; i < kNumClasses; ++i) {
central_cache_[i].Init(i);
}
- // It's important to have PageHeap allocated, not in static storage,
- // so that HeapLeakChecker does not consider all the byte patterns stored
- // in is caches as pointers that are sources of heap object liveness,
- // which leads to it missing some memory leaks.
- pageheap_ = new (MetaDataAlloc(sizeof(PageHeap))) PageHeap;
+ new ((void*)pageheap_memory_) PageHeap;
DLL_Init(&sampled_objects_);
Sampler::InitStatics();
}
« no previous file with comments | « third_party/tcmalloc/chromium/src/static_vars.h ('k') | third_party/tcmalloc/chromium/src/symbolize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698