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

Side by Side Diff: base/process_util.cc

Issue 7671033: Changing OOM range to 0, 1000 and tweaking OOM algorithm. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More review changes Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/process_util.h ('k') | base/process_util_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/process_util.h" 5 #include "base/process_util.h"
6 6
7 namespace base { 7 namespace base {
8 8
9 #if defined(OS_LINUX)
10 // Definition for exported constant defined in header. This is used
11 // to pass the oom score to the setuid sandbox.
12 const char kAdjustOOMScoreSwitch[] = "--adjust-oom-score";
13 #endif
14
9 #if defined(OS_POSIX) 15 #if defined(OS_POSIX)
10 ProcessEntry::ProcessEntry() : pid_(0), ppid_(0), gid_(0) {} 16 ProcessEntry::ProcessEntry() : pid_(0), ppid_(0), gid_(0) {}
11 ProcessEntry::~ProcessEntry() {} 17 ProcessEntry::~ProcessEntry() {}
12 #endif 18 #endif
13 19
14 int GetProcessCount(const FilePath::StringType& executable_name, 20 int GetProcessCount(const FilePath::StringType& executable_name,
15 const ProcessFilter* filter) { 21 const ProcessFilter* filter) {
16 int count = 0; 22 int count = 0;
17 NamedProcessIterator iter(executable_name, filter); 23 NamedProcessIterator iter(executable_name, filter);
18 while (iter.NextProcessEntry()) 24 while (iter.NextProcessEntry())
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 NamedProcessIterator::NamedProcessIterator( 65 NamedProcessIterator::NamedProcessIterator(
60 const FilePath::StringType& executable_name, 66 const FilePath::StringType& executable_name,
61 const ProcessFilter* filter) : ProcessIterator(filter), 67 const ProcessFilter* filter) : ProcessIterator(filter),
62 executable_name_(executable_name) { 68 executable_name_(executable_name) {
63 } 69 }
64 70
65 NamedProcessIterator::~NamedProcessIterator() { 71 NamedProcessIterator::~NamedProcessIterator() {
66 } 72 }
67 73
68 } // namespace base 74 } // namespace base
OLDNEW
« no previous file with comments | « base/process_util.h ('k') | base/process_util_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698