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

Unified Diff: base/memory/discardable_memory_android.cc

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.h ('k') | base/memory/discardable_memory_emulated.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/discardable_memory_android.cc
diff --git a/base/memory/discardable_memory_android.cc b/base/memory/discardable_memory_android.cc
index 8988c2b8d2bd46d759ec2f9c42243b6274d114be..acf29ac85f11eb19df32b638048d4ded8e9990a5 100644
--- a/base/memory/discardable_memory_android.cc
+++ b/base/memory/discardable_memory_android.cc
@@ -32,10 +32,7 @@ size_t GetOptimalAshmemRegionSizeForAllocator() {
// Holds the shared state used for allocations.
struct SharedState {
SharedState()
- : manager(kAshmemMemoryLimit,
- kAshmemMemoryLimit,
- kAshmemMemoryLimit,
- TimeDelta::Max()),
+ : manager(kAshmemMemoryLimit, kAshmemMemoryLimit, TimeDelta::Max()),
allocator(kAshmemAllocatorName,
GetOptimalAshmemRegionSizeForAllocator()) {}
@@ -47,16 +44,6 @@ LazyInstance<SharedState>::Leaky g_shared_state = LAZY_INSTANCE_INITIALIZER;
} // namespace
// static
-void DiscardableMemory::RegisterMemoryPressureListeners() {
- internal::DiscardableMemoryEmulated::RegisterMemoryPressureListeners();
-}
-
-// static
-void DiscardableMemory::UnregisterMemoryPressureListeners() {
- internal::DiscardableMemoryEmulated::UnregisterMemoryPressureListeners();
-}
-
-// static
bool DiscardableMemory::ReduceMemoryUsage() {
return internal::DiscardableMemoryEmulated::ReduceMemoryUsage();
}
« no previous file with comments | « base/memory/discardable_memory.h ('k') | base/memory/discardable_memory_emulated.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698