| 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
|
|
|