summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-29 16:38:46 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-29 16:38:46 +0000
commit232f03d67860d45f75151e35a2f4ad4fab93f2f8 (patch)
tree5cec1696b201f111c154bf827dd49c5be4d03597
parent5936be047554393c76cc5146d79f2092a74a3258 (diff)
downloadchromium_src-232f03d67860d45f75151e35a2f4ad4fab93f2f8.zip
chromium_src-232f03d67860d45f75151e35a2f4ad4fab93f2f8.tar.gz
chromium_src-232f03d67860d45f75151e35a2f4ad4fab93f2f8.tar.bz2
Reverting 17183 since it caused linux unit_test breakage.
Review URL: http://codereview.chromium.org/115929 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17195 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--AUTHORS1
-rw-r--r--chrome/browser/renderer_host/backing_store.cc19
2 files changed, 4 insertions, 16 deletions
diff --git a/AUTHORS b/AUTHORS
index f907400..182aa64 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -39,4 +39,3 @@ Robert Sesek <rsesek@bluestatic.org>
Janwar Dinata <j.dinata@gmail.com>
Will Hirsch <chromium@willhirsch.co.uk>
Yoav Zilberberg <yoav.zilberberg@gmail.com>
-Joel Stanley <joel@jms.id.au>
diff --git a/chrome/browser/renderer_host/backing_store.cc b/chrome/browser/renderer_host/backing_store.cc
index 1516e8b..8f8a1c9 100644
--- a/chrome/browser/renderer_host/backing_store.cc
+++ b/chrome/browser/renderer_host/backing_store.cc
@@ -4,9 +4,7 @@
#include "chrome/browser/renderer_host/backing_store.h"
-#include "base/sys_info.h"
#include "chrome/browser/renderer_host/render_widget_host.h"
-#include "chrome/common/chrome_constants.h"
namespace {
@@ -14,20 +12,11 @@ typedef OwningMRUCache<RenderWidgetHost*, BackingStore*> BackingStoreCache;
static BackingStoreCache* cache = NULL;
// Returns the size of the backing store cache.
+// TODO(iyengar) Make this dynamic, i.e. based on the available resources
+// on the machine.
static int GetBackingStoreCacheSize() {
- // This uses a similar approach to GetMaxRendererProcessCount. The goal
- // is to reduce memory pressure and swapping on low-resource machines.
- static const int kMaxDibCountByRamTier[] = {
- 2, // less than 256MB
- 3, // 256MB
- 4, // 512MB
- 5 // 768MB and above
- };
-
- static int max_size = kMaxDibCountByRamTier[
- std::max(base::SysInfo::AmountOfPhysicalMemoryMB() / 256,
- static_cast<int>(arraysize(kMaxDibCountByRamTier)) - 1)];
- return max_size;
+ const int kMaxSize = 5;
+ return kMaxSize;
}
// Creates the backing store for the host based on the dimensions passed in.