Index: third_party/tcmalloc/vendor/src/central_freelist.h |
diff --git a/third_party/tcmalloc/vendor/src/central_freelist.h b/third_party/tcmalloc/vendor/src/central_freelist.h |
index 27e9d353e0f83fa35ee1b7bd44acbc9956e7540d..4fd5799de9ab53a6458942edaa056b7b56e174b5 100644 |
--- a/third_party/tcmalloc/vendor/src/central_freelist.h |
+++ b/third_party/tcmalloc/vendor/src/central_freelist.h |
@@ -48,6 +48,11 @@ namespace tcmalloc { |
// Data kept per size-class in central cache. |
class CentralFreeList { |
public: |
+ // A CentralFreeList may be used before its constructor runs. |
+ // So we prevent lock_'s constructor from doing anything to the |
+ // lock_ state. |
+ CentralFreeList() : lock_(base::LINKER_INITIALIZED) { } |
+ |
void Init(size_t cl); |
// These methods all do internal locking. |