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

Unified Diff: base/memory/discardable_memory_manager.h

Issue 195863005: Use DiscardableMemoryManager on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix base.gypi Created 6 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
Index: base/memory/discardable_memory_manager.h
diff --git a/base/memory/discardable_memory_manager.h b/base/memory/discardable_memory_manager.h
index 844752151e64fe0b06df2a88fe2ab43da0fe619e..0a25622d9d0db4d40d00dfa9da58aca1f0886d2e 100644
--- a/base/memory/discardable_memory_manager.h
+++ b/base/memory/discardable_memory_manager.h
@@ -16,6 +16,11 @@ namespace internal {
// This interface is used by the DiscardableMemoryManager class to provide some
// level of userspace control over discardable memory allocations.
+//
+// Thread-safety: The methods below are called while the manager's mutex is
+// acquired. This means that subclasses don't need to deal with synchronization
+// as long as they correctly go through the manager's methods (e.g.
+// AcuireLock(), ReleaseLock()...).
reveman 2014/04/26 00:13:37 It's really the usage by the manager rather than t
class DiscardableMemoryManagerAllocation {
public:
// Allocate and acquire a lock that prevents the allocation from being purged

Powered by Google App Engine
This is Rietveld 408576698