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

Unified Diff: base/memory/discardable_memory.h

Issue 681713002: Update from chromium https://crrev.com/301315 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 2 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/mac/mac_util.mm ('k') | base/memory/discardable_memory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/discardable_memory.h
diff --git a/base/memory/discardable_memory.h b/base/memory/discardable_memory.h
index 5f83e333775b664c9f1e796e9b372c22c1768888..d8b7a58fbbb60ac23517170c949d5c476868bea0 100644
--- a/base/memory/discardable_memory.h
+++ b/base/memory/discardable_memory.h
@@ -19,7 +19,8 @@ enum DiscardableMemoryType {
DISCARDABLE_MEMORY_TYPE_NONE,
DISCARDABLE_MEMORY_TYPE_ASHMEM,
DISCARDABLE_MEMORY_TYPE_MACH,
- DISCARDABLE_MEMORY_TYPE_EMULATED
+ DISCARDABLE_MEMORY_TYPE_EMULATED,
+ DISCARDABLE_MEMORY_TYPE_SHMEM
};
enum DiscardableMemoryLockStatus {
@@ -88,6 +89,10 @@ class BASE_EXPORT DiscardableMemory {
// Create a DiscardableMemory instance with preferred type and |size|.
static scoped_ptr<DiscardableMemory> CreateLockedMemory(size_t size);
+ // Discardable memory implementations might use this to release memory
+ // or resources assigned to instances that have been purged.
+ static void ReleaseFreeMemory();
+
// Discardable memory implementations might allow an elevated usage level
// while in frequent use. Call this to have the usage reduced to the base
// level. Returns true if there's no need to call this again until
« no previous file with comments | « base/mac/mac_util.mm ('k') | base/memory/discardable_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698