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

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: disable EmulatedDiscardableMemoryDiscardedWhenWidgetsHidden with lsan 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..d928513527ea895f1e44ebd3a0415bfe446e3319 100644
--- a/base/memory/discardable_memory_emulated.h
+++ b/base/memory/discardable_memory_emulated.h
@@ -19,10 +19,13 @@ 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
+ BASE_EXPORT static void ReduceMemoryUsageUntilWithinLimit(size_t bytes);
+
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