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

Unified Diff: base/metrics/persistent_memory_allocator.h

Issue 1840843004: Improve efficiency of persistent sparse histograms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@improved-pma-iterator
Patch Set: added comment clarifying loop behavior Created 4 years, 8 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 45777fe4477f77777f32942caad4ac9ddf230eba..4c0db5264a8f810721653d130c6428437ef5f9aa 100644
--- a/base/metrics/persistent_memory_allocator.h
+++ b/base/metrics/persistent_memory_allocator.h
@@ -118,6 +118,10 @@ class BASE_EXPORT PersistentMemoryAllocator {
size_t free;
};
+ enum : Reference {
+ kReferenceNull = 0 // A common "null" reference value.
+ };
+
enum : uint32_t {
kTypeIdAny = 0 // Match any type-id inside GetAsObject().
};
@@ -284,7 +288,6 @@ class BASE_EXPORT PersistentMemoryAllocator {
struct BlockHeader;
static const uint32_t kAllocAlignment;
static const Reference kReferenceQueue;
- static const Reference kReferenceNull;
// The shared metadata is always located at the top of the memory segment.
// These convenience functions eliminate constant casting of the base
« 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