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

Unified Diff: base/memory/discardable_memory_emulated.h

Issue 448173002: Re-land: base: Introduce an explicit call for reducing emulated discardable memory usage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/memory/discardable_memory_android.cc ('k') | base/memory/discardable_memory_emulated.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/discardable_memory_emulated.h
diff --git a/base/memory/discardable_memory_emulated.h b/base/memory/discardable_memory_emulated.h
index 64e99511b7caad0ec835ec9cd245f262bf100b74..5010c699aa793194fe1edf704f8c96ae10bbb7be 100644
--- a/base/memory/discardable_memory_emulated.h
+++ b/base/memory/discardable_memory_emulated.h
@@ -19,10 +19,14 @@ class DiscardableMemoryEmulated
explicit DiscardableMemoryEmulated(size_t bytes);
virtual ~DiscardableMemoryEmulated();
- static void RegisterMemoryPressureListeners();
- static void UnregisterMemoryPressureListeners();
static bool ReduceMemoryUsage();
+ // TODO(reveman): Remove this as it is breaking the discardable memory design
+ // principle that implementations should not rely on information this is
+ // unavailable in kernel space. crbug.com/400423
+ static void SetModeratePressureLimit(size_t bytes);
+ static void ReduceMemoryUsageUntilWithinModeratePressureLimit();
reveman 2014/08/07 15:24:29 Note: I can rename all references to "ModeratePres
+
static void PurgeForTesting();
bool Initialize();
« no previous file with comments | « base/memory/discardable_memory_android.cc ('k') | base/memory/discardable_memory_emulated.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698