| OLD | NEW |
| 1 // Copyright (c) 2011 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 #include <ctype.h> | 7 #include <ctype.h> |
| 8 #include <dirent.h> | 8 #include <dirent.h> |
| 9 #include <dlfcn.h> | 9 #include <dlfcn.h> |
| 10 #include <errno.h> | 10 #include <errno.h> |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 length = sizeof(pathname); | 45 length = sizeof(pathname); |
| 46 | 46 |
| 47 if (sysctl(mib, arraysize(mib), pathname, &length, NULL, 0) < 0 || | 47 if (sysctl(mib, arraysize(mib), pathname, &length, NULL, 0) < 0 || |
| 48 length == 0) { | 48 length == 0) { |
| 49 return FilePath(); | 49 return FilePath(); |
| 50 } | 50 } |
| 51 | 51 |
| 52 return FilePath(std::string(pathname)); | 52 return FilePath(std::string(pathname)); |
| 53 } | 53 } |
| 54 | 54 |
| 55 void EnableTerminationOnOutOfMemory() { | |
| 56 DLOG(WARNING) << "Not feasible."; | |
| 57 } | |
| 58 | |
| 59 void EnableTerminationOnHeapCorruption() { | |
| 60 // Nothing to do. | |
| 61 } | |
| 62 | |
| 63 bool AdjustOOMScore(ProcessId process, int score) { | |
| 64 NOTIMPLEMENTED(); | |
| 65 return false; | |
| 66 } | |
| 67 | |
| 68 } // namespace base | 55 } // namespace base |
| OLD | NEW |