summaryrefslogtreecommitdiffstats
path: root/chrome/browser/oom_priority_manager.h
diff options
context:
space:
mode:
authorgspencer@chromium.org <gspencer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-04 19:12:39 +0000
committergspencer@chromium.org <gspencer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-04 19:12:39 +0000
commit8ebe4104c62700929a9dfddf05fdd16a171058c6 (patch)
treee44fffa284dc719740ff586cbc3976d7b71af5a4 /chrome/browser/oom_priority_manager.h
parent00cea5f7625061c82a9b9413d78ee974e05b0538 (diff)
downloadchromium_src-8ebe4104c62700929a9dfddf05fdd16a171058c6.zip
chromium_src-8ebe4104c62700929a9dfddf05fdd16a171058c6.tar.gz
chromium_src-8ebe4104c62700929a9dfddf05fdd16a171058c6.tar.bz2
Revert 65010 - Adding OOM priority management for renderers on ChromeOS.
Reverting because this causes problems on valgrind (for ChromeOS only). Turns out that TabStripModel is not thread safe, and I'm calling from another thread. Review URL: http://codereview.chromium.org/4446002 TBR=gspencer@chromium.org Review URL: http://codereview.chromium.org/4417006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65091 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/oom_priority_manager.h')
-rw-r--r--chrome/browser/oom_priority_manager.h48
1 files changed, 0 insertions, 48 deletions
diff --git a/chrome/browser/oom_priority_manager.h b/chrome/browser/oom_priority_manager.h
deleted file mode 100644
index 0073406..0000000
--- a/chrome/browser/oom_priority_manager.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_OOM_PRIORITY_MANAGER_H_
-#define CHROME_BROWSER_OOM_PRIORITY_MANAGER_H_
-
-#include "base/timer.h"
-
-namespace browser {
-
-// The OomPriorityManager periodically checks (see
-// ADJUSTMENT_INTERVAL_SECONDS in the source) the status of renderers
-// and adjusts the out of memory (OOM) adjustment value (in
-// /proc/<pid>/oom_adj) of the renderers so that they match the
-// algorithm embedded here for priority in being killed upon OOM
-// conditions.
-//
-// The algorithm used favors killing tabs that are not pinned, have
-// been idle for longest, and take up the most memory, in that order
-// of priority. We round the idle times to the nearest few minutes
-// (see BUCKET_INTERVAL_MINUTES in the source) so that we can bucket
-// them, as no two tabs will have exactly the same idle time.
-class OomPriorityManager {
- public:
- OomPriorityManager();
- ~OomPriorityManager();
-
- private:
- void StartTimer();
- void StopTimer();
-
- // Starts DoAdjustOomPriorities on the file threadead. Called when the
- // timer fires.
- void AdjustOomPriorities();
-
- // Called by AdjustOomPriorities. Runs on the file thread.
- void DoAdjustOomPriorities();
-
- base::RepeatingTimer<OomPriorityManager> timer_;
-
- DISALLOW_COPY_AND_ASSIGN(OomPriorityManager);
-};
-} // namespace browser
-
-DISABLE_RUNNABLE_METHOD_REFCOUNT(browser::OomPriorityManager);
-
-#endif // CHROME_BROWSER_OOM_PRIORITY_MANAGER_H_