| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // This file/namespace contains utility functions for enumerating, ending and | 5 // This file/namespace contains utility functions for enumerating, ending and |
| 6 // computing statistics of processes. | 6 // computing statistics of processes. |
| 7 | 7 |
| 8 #ifndef BASE_PROCESS_UTIL_H_ | 8 #ifndef BASE_PROCESS_UTIL_H_ |
| 9 #define BASE_PROCESS_UTIL_H_ | 9 #define BASE_PROCESS_UTIL_H_ |
| 10 | 10 |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 int64 last_system_time_; | 413 int64 last_system_time_; |
| 414 | 414 |
| 415 #if defined(OS_LINUX) | 415 #if defined(OS_LINUX) |
| 416 // Jiffie count at the last_time_ we updated. | 416 // Jiffie count at the last_time_ we updated. |
| 417 int last_cpu_; | 417 int last_cpu_; |
| 418 #endif | 418 #endif |
| 419 | 419 |
| 420 DISALLOW_EVIL_CONSTRUCTORS(ProcessMetrics); | 420 DISALLOW_EVIL_CONSTRUCTORS(ProcessMetrics); |
| 421 }; | 421 }; |
| 422 | 422 |
| 423 // Returns the memory commited by the system in KBytes. |
| 424 // Returns 0 if it can't compute the commit charge. |
| 425 size_t GetSystemCommitCharge(); |
| 426 |
| 423 // Enables low fragmentation heap (LFH) for every heaps of this process. This | 427 // Enables low fragmentation heap (LFH) for every heaps of this process. This |
| 424 // won't have any effect on heaps created after this function call. It will not | 428 // won't have any effect on heaps created after this function call. It will not |
| 425 // modify data allocated in the heaps before calling this function. So it is | 429 // modify data allocated in the heaps before calling this function. So it is |
| 426 // better to call this function early in initialization and again before | 430 // better to call this function early in initialization and again before |
| 427 // entering the main loop. | 431 // entering the main loop. |
| 428 // Note: Returns true on Windows 2000 without doing anything. | 432 // Note: Returns true on Windows 2000 without doing anything. |
| 429 bool EnableLowFragmentationHeap(); | 433 bool EnableLowFragmentationHeap(); |
| 430 | 434 |
| 431 // Enables 'terminate on heap corruption' flag. Helps protect against heap | 435 // Enables 'terminate on heap corruption' flag. Helps protect against heap |
| 432 // overflow. Has no effect if the OS doesn't provide the necessary facility. | 436 // overflow. Has no effect if the OS doesn't provide the necessary facility. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 450 // instance running inside the parent. The parent's Breakpad instance should | 454 // instance running inside the parent. The parent's Breakpad instance should |
| 451 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler | 455 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler |
| 452 // in the child after forking will restore the standard exception handler. | 456 // in the child after forking will restore the standard exception handler. |
| 453 // See http://crbug.com/20371/ for more details. | 457 // See http://crbug.com/20371/ for more details. |
| 454 void RestoreDefaultExceptionHandler(); | 458 void RestoreDefaultExceptionHandler(); |
| 455 #endif | 459 #endif |
| 456 | 460 |
| 457 } // namespace base | 461 } // namespace base |
| 458 | 462 |
| 459 #endif // BASE_PROCESS_UTIL_H_ | 463 #endif // BASE_PROCESS_UTIL_H_ |
| OLD | NEW |