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

Unified Diff: base/memory/discardable_memory_android.cc

Issue 391273002: Merge 281795 "base: Add soft memory limit to DiscardableMemoryMa..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2062/src/
Patch Set: Created 6 years, 5 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
===================================================================
--- base/memory/discardable_memory_android.cc (revision 283285)
+++ base/memory/discardable_memory_android.cc (working copy)
@@ -32,7 +32,10 @@
// Holds the shared state used for allocations.
struct SharedState {
SharedState()
- : manager(kAshmemMemoryLimit, kAshmemMemoryLimit),
+ : manager(kAshmemMemoryLimit,
+ kAshmemMemoryLimit,
+ kAshmemMemoryLimit,
+ TimeDelta::Max()),
allocator(kAshmemAllocatorName,
GetOptimalAshmemRegionSizeForAllocator()) {}
@@ -54,6 +57,11 @@
}
// static
+bool DiscardableMemory::ReduceMemoryUsage() {
+ return internal::DiscardableMemoryEmulated::ReduceMemoryUsage();
+}
+
+// static
void DiscardableMemory::GetSupportedTypes(
std::vector<DiscardableMemoryType>* types) {
const DiscardableMemoryType supported_types[] = {
« 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