Chromium Code Reviews| Index: content/browser/zygote_host_linux.cc |
| diff --git a/content/browser/zygote_host_linux.cc b/content/browser/zygote_host_linux.cc |
| index a0ca2fc9b2b7254698e5d71b6fafc6fb08268630..f15165d5ce3c5534d30b07e22cb56de56c77d6ce 100644 |
| --- a/content/browser/zygote_host_linux.cc |
| +++ b/content/browser/zygote_host_linux.cc |
| @@ -306,6 +306,7 @@ pid_t ZygoteHost::ForkRequest( |
| return base::kNullProcessHandle; |
| } |
| +#if defined(OS_LINUX) |
|
Mark Mentovai
2011/10/26 23:24:28
It’s weird to see this in a _linux file. Can you c
stevenjb
2011/10/27 16:01:54
It is even weirder to be including _linux files in
Robert Nagy
2011/10/31 15:38:38
Done.
|
| // This is just a starting score for a renderer or extension (the |
| // only types of processes that will be started this way). It will |
| // get adjusted as time goes on. (This is the same value as |
| @@ -313,10 +314,12 @@ pid_t ZygoteHost::ForkRequest( |
| // that's not something we can include here.) |
| const int kLowestRendererOomScore = 300; |
| AdjustRendererOOMScore(pid, kLowestRendererOomScore); |
| +#endif |
| return pid; |
| } |
| +#if defined(OS_LINUX) |
| void ZygoteHost::AdjustRendererOOMScore(base::ProcessHandle pid, int score) { |
| // 1) You can't change the oom_score_adj of a non-dumpable process |
| // (EPERM) unless you're root. Because of this, we can't set the |
| @@ -383,6 +386,7 @@ void ZygoteHost::AdjustRendererOOMScore(base::ProcessHandle pid, int score) { |
| PLOG(ERROR) << "Failed to adjust OOM score of renderer with pid " << pid; |
| } |
| } |
| +#endif |
| void ZygoteHost::EnsureProcessTerminated(pid_t process) { |
| DCHECK(init_); |