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

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

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
Index: third_party/tcmalloc/chromium/src/static_vars.h
===================================================================
--- third_party/tcmalloc/chromium/src/static_vars.h (revision 126022)
+++ third_party/tcmalloc/chromium/src/static_vars.h (working copy)
@@ -65,7 +65,9 @@
// must be protected by pageheap_lock.
// Page-level allocator.
- static PageHeap* pageheap() { return pageheap_; }
+ static PageHeap* pageheap() {
+ return reinterpret_cast<PageHeap*>(pageheap_memory_);
+ }
static PageHeapAllocator<Span>* span_allocator() { return &span_allocator_; }
@@ -103,7 +105,10 @@
// is stored in trace->stack[kMaxStackDepth-1].
static StackTrace* growth_stacks_;
- static PageHeap* pageheap_;
+ // PageHeap uses a constructor for initialization. Like the members above,
+ // we can't depend on initialization order, so pageheap is new'd
+ // into this buffer.
+ static char pageheap_memory_[sizeof(PageHeap)];
};
} // namespace tcmalloc
« no previous file with comments | « third_party/tcmalloc/chromium/src/stacktrace_x86_64-inl.h ('k') | third_party/tcmalloc/chromium/src/static_vars.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698