tcmalloc: Remove use of LINKER_INITIALIZED in STLPageHeapAllocator

Remove use of LINKER_INITILIZED flag for
STLPageHeapAllocator<T, LockingTag>::underlying_.

This is a templated static variable and the compiler doesn't optimize
it away as expected. The reasoning is that the templated variable may
be instantiated from multiple compilation units and the optimization
pass misses this opportunity.

Removing the explicit constructor, enables the compiler to optimize the
global constructor away.


Change-Id: I8674bfe7dc42a24ef522733f45a9330ae2b33946
Commit-Queue: Gabriel Marin <>
Reviewed-by: Will Harris <>
Cr-Original-Commit-Position: refs/heads/master@{#653673}
Cr-Mirrored-Commit: f2131e7ccf1ca01a4e09058316f019b3ecb78fb7
diff --git a/src/page_heap_allocator.h b/src/page_heap_allocator.h
index ad7e1c9..add1701 100644
--- a/src/page_heap_allocator.h
+++ b/src/page_heap_allocator.h
@@ -163,15 +163,15 @@
   struct Storage {
-    explicit Storage(base::LinkerInitialized x) {}
     PageHeapAllocator<T> allocator;
     bool initialized;
   static Storage underlying_;
-template<typename T, class LockingTag>
-typename STLPageHeapAllocator<T, LockingTag>::Storage STLPageHeapAllocator<T, LockingTag>::underlying_(base::LINKER_INITIALIZED);
+template <typename T, class LockingTag>
+typename STLPageHeapAllocator<T, LockingTag>::Storage
+    STLPageHeapAllocator<T, LockingTag>::underlying_;
 }  // namespace tcmalloc