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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_MEMORY_DISCARDABLE_SHARED_MEMORY_H_ 5 #ifndef BASE_MEMORY_DISCARDABLE_SHARED_MEMORY_H_
6 #define BASE_MEMORY_DISCARDABLE_SHARED_MEMORY_H_ 6 #define BASE_MEMORY_DISCARDABLE_SHARED_MEMORY_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 size_t mapped_size_; 137 size_t mapped_size_;
138 size_t locked_page_count_; 138 size_t locked_page_count_;
139 #if DCHECK_IS_ON() 139 #if DCHECK_IS_ON()
140 std::set<size_t> locked_pages_; 140 std::set<size_t> locked_pages_;
141 #endif 141 #endif
142 // Implementation is not thread-safe but still usable if clients are 142 // Implementation is not thread-safe but still usable if clients are
143 // synchronized somehow. Use a collision warner to detect incorrect usage. 143 // synchronized somehow. Use a collision warner to detect incorrect usage.
144 DFAKE_MUTEX(thread_collision_warner_); 144 DFAKE_MUTEX(thread_collision_warner_);
145 Time last_known_usage_; 145 Time last_known_usage_;
146 146
147 // Indicates whether Lock/Unlock pinning is supported on this platform.
148 // Call DoPinning() to access this information from within class functions.
149 static char pinning_supported_;
150 bool DoPinning();
151
147 DISALLOW_COPY_AND_ASSIGN(DiscardableSharedMemory); 152 DISALLOW_COPY_AND_ASSIGN(DiscardableSharedMemory);
148 }; 153 };
149 154
150 } // namespace base 155 } // namespace base
151 156
152 #endif // BASE_MEMORY_DISCARDABLE_SHARED_MEMORY_H_ 157 #endif // BASE_MEMORY_DISCARDABLE_SHARED_MEMORY_H_
OLDNEW
« 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