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

Unified Diff: base/metrics/persistent_memory_allocator.h

Issue 2886453002: Use acquire/relase for delayed persistent allocations. (Closed)
Patch Set: rebased Created 3 years, 7 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
« no previous file with comments | « base/metrics/persistent_histogram_allocator.cc ('k') | base/metrics/persistent_memory_allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/persistent_memory_allocator.h
diff --git a/base/metrics/persistent_memory_allocator.h b/base/metrics/persistent_memory_allocator.h
index b931b2f6b61add814a5a1ad3c4436fd3280758d1..b7e7bd08c3d20a0539e98e2ad436901378694947 100644
--- a/base/metrics/persistent_memory_allocator.h
+++ b/base/metrics/persistent_memory_allocator.h
@@ -793,7 +793,8 @@ class BASE_EXPORT DelayedPersistentAllocation {
// Once allocated, a reference to the segment will be stored at |ref|.
// This shared location must be initialized to zero (0); it is checked
// with every Get() request to see if the allocation has already been
- // done.
+ // done. If reading |ref| outside of this object, be sure to do an
+ // "acquire" load. Don't write to it -- leave that to this object.
//
// For convenience, methods taking both Atomic32 and std::atomic<Reference>
// are defined.
« no previous file with comments | « base/metrics/persistent_histogram_allocator.cc ('k') | base/metrics/persistent_memory_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698