| Index: base/metrics/persistent_memory_allocator.cc
|
| diff --git a/base/metrics/persistent_memory_allocator.cc b/base/metrics/persistent_memory_allocator.cc
|
| index 3c5198ae9eaaf18ecab312107239e6f5c82c0bb6..deb82ac1dbe28aa26d14ee98f48139b3068b3488 100644
|
| --- a/base/metrics/persistent_memory_allocator.cc
|
| +++ b/base/metrics/persistent_memory_allocator.cc
|
| @@ -1133,7 +1133,7 @@ DelayedPersistentAllocation::~DelayedPersistentAllocation() {}
|
| void* DelayedPersistentAllocation::Get() const {
|
| // Relaxed operations are acceptable here because it's not protecting the
|
| // contents of the allocation in any way.
|
| - Reference ref = reference_->load(std::memory_order_relaxed);
|
| + Reference ref = reference_->load(std::memory_order_acquire);
|
| if (!ref) {
|
| ref = allocator_->Allocate(size_, type_);
|
| if (!ref)
|
| @@ -1144,7 +1144,7 @@ void* DelayedPersistentAllocation::Get() const {
|
| // cannot be retried.
|
| Reference existing = 0; // Must be mutable; receives actual value.
|
| if (reference_->compare_exchange_strong(existing, ref,
|
| - std::memory_order_relaxed,
|
| + std::memory_order_release,
|
| std::memory_order_relaxed)) {
|
| if (make_iterable_)
|
| allocator_->MakeIterable(ref);
|
|
|