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

Unified Diff: base/memory/discardable_memory_emulated.cc

Issue 342943008: base: Increase hard limit for emulated discardable memory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/discardable_memory_emulated.cc
diff --git a/base/memory/discardable_memory_emulated.cc b/base/memory/discardable_memory_emulated.cc
index 928a2dfdc7e0c294bb861e1157522ef5a2a0b468..d743ab3df5631cfe5e68b10db797b37c58dd3e5f 100644
--- a/base/memory/discardable_memory_emulated.cc
+++ b/base/memory/discardable_memory_emulated.cc
@@ -10,18 +10,19 @@
namespace base {
namespace {
-// This is admittedly pretty magical. It's approximately enough memory for four
-// 2560x1600 images.
-const size_t kEmulatedMemoryLimit = 64 * 1024 * 1024;
-const size_t kEmulatedBytesToKeepUnderModeratePressure =
- kEmulatedMemoryLimit / 4;
+// This is admittedly pretty magical.
+const size_t kEmulatedMemoryLimit = 512 * 1024 * 1024;
+const size_t kEmulatedSoftMemoryLimit = 32 * 1024 * 1024;
+const size_t kEmulatedBytesToKeepUnderModeratePressure = 4 * 1024 * 1024;
+const size_t kEmulatedHardMemoryLimitExpirationTimeMs = 1000;
struct SharedState {
SharedState()
: manager(kEmulatedMemoryLimit,
- kEmulatedMemoryLimit,
+ kEmulatedSoftMemoryLimit,
kEmulatedBytesToKeepUnderModeratePressure,
- TimeDelta::Max()) {}
+ TimeDelta::FromMilliseconds(
+ kEmulatedHardMemoryLimitExpirationTimeMs)) {}
internal::DiscardableMemoryManager manager;
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698