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

Unified Diff: base/memory/discardable_shared_memory.h

Issue 1427163003: [Discardable Shared Memory] Adding Windows support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review fixes part 3. (Static Windows version back (but cleaner), and more comments.) Created 5 years, 1 month 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 | « no previous file | base/memory/discardable_shared_memory.cc » ('j') | base/memory/discardable_shared_memory.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/discardable_shared_memory.h
diff --git a/base/memory/discardable_shared_memory.h b/base/memory/discardable_shared_memory.h
index 0b5ac9fba8e5f7d9f82245720b69bd9c4051b49b..8a1e2b0ccc19387f3e8cb403bcd033edb3f4337e 100644
--- a/base/memory/discardable_shared_memory.h
+++ b/base/memory/discardable_shared_memory.h
@@ -15,6 +15,10 @@
#include <set>
#endif
+#if defined(OS_WIN)
+#include "base/win/windows_version.h"
+#endif
+
// Linux (including Android) support the MADV_REMOVE argument with madvise()
// which has the behavior of reliably causing zero-fill-on-demand pages to
// be returned after a call. Here we define
@@ -144,6 +148,12 @@ class BASE_EXPORT DiscardableSharedMemory {
DFAKE_MUTEX(thread_collision_warner_);
Time last_known_usage_;
+#if defined(OS_WIN)
+ // Static Windows version.
+ // Not const as we'll first initialize, then lazy init this value.
+ static base::win::Version osVersion;
+#endif
+
DISALLOW_COPY_AND_ASSIGN(DiscardableSharedMemory);
};
« no previous file with comments | « no previous file | base/memory/discardable_shared_memory.cc » ('j') | base/memory/discardable_shared_memory.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698