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

Unified Diff: base/process_util.h

Issue 467058: Linux: Adjust /proc/pid/oom_adj to sacrifice plugin and renderer processes to... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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 | base/process_util_linux.cc » ('j') | sandbox/linux/suid/process_util_linux.c » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util.h
===================================================================
--- base/process_util.h (revision 34180)
+++ base/process_util.h (working copy)
@@ -100,6 +100,13 @@
// CPU-related ticks. Returns -1 on parse error.
// Exposed for testing.
int ParseProcStatCPU(const std::string& input);
+
+static const char kAdjustOOMScoreSwitch[] = "--adjust-oom-score";
+
+// This adjusts /proc/process/oom_adj so the Linux OOM killer will prefer
+// certain process types over others. The range for the adjustment is
+// [-17,15], with [0,15] being user accessible.
+bool AdjustOOMScore(ProcessId process, int score);
#endif
#if defined(OS_POSIX)
« no previous file with comments | « no previous file | base/process_util_linux.cc » ('j') | sandbox/linux/suid/process_util_linux.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698