Index: base/process_util.h |
diff --git a/base/process_util.h b/base/process_util.h |
index 0bec8e0848e0d7e961e4ec80fc248943db60f0ca..334fdec6f380b77928eecb7a6dff0b6cbd2b53b1 100644 |
--- a/base/process_util.h |
+++ b/base/process_util.h |
@@ -36,6 +36,7 @@ typedef struct _malloc_zone_t malloc_zone_t; |
#include "base/base_export.h" |
#include "base/files/file_path.h" |
#include "base/process.h" |
+#include "base/process/memory.h" |
#include "base/process/process_iterator.h" |
#include "base/process/process_metrics.h" |
@@ -59,10 +60,6 @@ enum TerminationStatus { |
TERMINATION_STATUS_MAX_ENUM |
}; |
-#if defined(USE_LINUX_BREAKPAD) |
-BASE_EXPORT extern size_t g_oom_size; |
-#endif |
- |
#if defined(OS_WIN) |
// Output multi-process printf, cout, cerr, etc to the cmd.exe console that ran |
// chrome. This is not thread-safe: only call from main thread. |
@@ -75,12 +72,6 @@ BASE_EXPORT ProcessId GetCurrentProcId(); |
// Returns the ProcessHandle of the current process. |
BASE_EXPORT ProcessHandle GetCurrentProcessHandle(); |
-#if defined(OS_WIN) |
-// Returns the module handle to which an address belongs. The reference count |
-// of the module is not incremented. |
-BASE_EXPORT HMODULE GetModuleFromAddress(void* address); |
-#endif |
- |
// Converts a PID to a process handle. This handle must be closed by |
// CloseProcessHandle when you are done with it. Returns true on success. |
BASE_EXPORT bool OpenProcessHandle(ProcessId pid, ProcessHandle* handle); |
@@ -120,18 +111,6 @@ BASE_EXPORT FilePath GetProcessExecutablePath(ProcessHandle process); |
// Returns 0 on failure. |
BASE_EXPORT int GetNumberOfThreads(ProcessHandle process); |
-// The maximum allowed value for the OOM score. |
-const int kMaxOomScore = 1000; |
- |
-// This adjusts /proc/<pid>/oom_score_adj so the Linux OOM killer will |
-// prefer to kill certain process types over others. The range for the |
-// adjustment is [-1000, 1000], with [0, 1000] being user accessible. |
-// If the Linux system doesn't support the newer oom_score_adj range |
-// of [0, 1000], then we revert to using the older oom_adj, and |
-// translate the given value into [0, 15]. Some aliasing of values |
-// may occur in that case, of course. |
-BASE_EXPORT bool AdjustOOMScore(ProcessId process, int score); |
- |
// /proc/self/exe refers to the current executable. |
BASE_EXPORT extern const char kProcSelfExe[]; |
#endif // defined(OS_LINUX) || defined(OS_ANDROID) |
@@ -475,21 +454,6 @@ BASE_EXPORT void EnsureProcessTerminated(ProcessHandle process_handle); |
BASE_EXPORT void EnsureProcessGetsReaped(ProcessHandle process_handle); |
#endif |
-// Enables low fragmentation heap (LFH) for every heaps of this process. This |
-// won't have any effect on heaps created after this function call. It will not |
-// modify data allocated in the heaps before calling this function. So it is |
-// better to call this function early in initialization and again before |
-// entering the main loop. |
-// Note: Returns true on Windows 2000 without doing anything. |
-BASE_EXPORT bool EnableLowFragmentationHeap(); |
- |
-// Enables 'terminate on heap corruption' flag. Helps protect against heap |
-// overflow. Has no effect if the OS doesn't provide the necessary facility. |
-BASE_EXPORT void EnableTerminationOnHeapCorruption(); |
- |
-// Turns on process termination if memory runs out. |
-BASE_EXPORT void EnableTerminationOnOutOfMemory(); |
- |
// If supported on the platform, and the user has sufficent rights, increase |
// the current process's scheduling priority to a high priority. |
BASE_EXPORT void RaiseProcessToHighPriority(); |
@@ -505,20 +469,6 @@ BASE_EXPORT void RaiseProcessToHighPriority(); |
void RestoreDefaultExceptionHandler(); |
#endif // defined(OS_MACOSX) |
-#if defined(OS_MACOSX) |
-// Very large images or svg canvases can cause huge mallocs. Skia |
-// does tricks on tcmalloc-based systems to allow malloc to fail with |
-// a NULL rather than hit the oom crasher. This replicates that for |
-// OSX. |
-// |
-// IF YOU USE THIS WITHOUT CONSULTING YOUR FRIENDLY OSX DEVELOPER, |
-// YOUR CODE IS LIKELY TO BE REVERTED. THANK YOU. |
-// |
-// TODO(shess): Weird place to put it, but this is where the OOM |
-// killer currently lives. |
-BASE_EXPORT void* UncheckedMalloc(size_t size); |
-#endif // defined(OS_MACOSX) |
- |
} // namespace base |
#endif // BASE_PROCESS_UTIL_H_ |