| 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 DISALLOW_EVIL_CONSTRUCTORS(NamedProcessIterator); | 286 DISALLOW_EVIL_CONSTRUCTORS(NamedProcessIterator); |
| 287 }; | 287 }; |
| 288 | 288 |
| 289 // Working Set (resident) memory usage broken down by | 289 // Working Set (resident) memory usage broken down by |
| 290 // priv (private): These pages (kbytes) cannot be shared with any other process. | 290 // priv (private): These pages (kbytes) cannot be shared with any other process. |
| 291 // shareable: These pages (kbytes) can be shared with other processes under | 291 // shareable: These pages (kbytes) can be shared with other processes under |
| 292 // the right circumstances. | 292 // the right circumstances. |
| 293 // shared : These pages (kbytes) are currently shared with at least one | 293 // shared : These pages (kbytes) are currently shared with at least one |
| 294 // other process. | 294 // other process. |
| 295 struct WorkingSetKBytes { | 295 struct WorkingSetKBytes { |
| 296 WorkingSetKBytes() : priv(0), shareable(0), shared(0) {} |
| 296 size_t priv; | 297 size_t priv; |
| 297 size_t shareable; | 298 size_t shareable; |
| 298 size_t shared; | 299 size_t shared; |
| 299 }; | 300 }; |
| 300 | 301 |
| 301 // Committed (resident + paged) memory usage broken down by | 302 // Committed (resident + paged) memory usage broken down by |
| 302 // private: These pages cannot be shared with any other process. | 303 // private: These pages cannot be shared with any other process. |
| 303 // mapped: These pages are mapped into the view of a section (backed by | 304 // mapped: These pages are mapped into the view of a section (backed by |
| 304 // pagefile.sys) | 305 // pagefile.sys) |
| 305 // image: These pages are mapped into the view of an image section (backed by | 306 // image: These pages are mapped into the view of an image section (backed by |
| 306 // file system) | 307 // file system) |
| 307 struct CommittedKBytes { | 308 struct CommittedKBytes { |
| 309 CommittedKBytes() : priv(0), mapped(0), image(0) {} |
| 308 size_t priv; | 310 size_t priv; |
| 309 size_t mapped; | 311 size_t mapped; |
| 310 size_t image; | 312 size_t image; |
| 311 }; | 313 }; |
| 312 | 314 |
| 313 // Free memory (Megabytes marked as free) in the 2G process address space. | 315 // Free memory (Megabytes marked as free) in the 2G process address space. |
| 314 // total : total amount in megabytes marked as free. Maximum value is 2048. | 316 // total : total amount in megabytes marked as free. Maximum value is 2048. |
| 315 // largest : size of the largest contiguous amount of memory found. It is | 317 // largest : size of the largest contiguous amount of memory found. It is |
| 316 // always smaller or equal to FreeMBytes::total. | 318 // always smaller or equal to FreeMBytes::total. |
| 317 // largest_ptr: starting address of the largest memory block. | 319 // largest_ptr: starting address of the largest memory block. |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 // overflow. Has no effect if the OS doesn't provide the necessary facility. | 404 // overflow. Has no effect if the OS doesn't provide the necessary facility. |
| 403 void EnableTerminationOnHeapCorruption(); | 405 void EnableTerminationOnHeapCorruption(); |
| 404 | 406 |
| 405 // If supported on the platform, and the user has sufficent rights, increase | 407 // If supported on the platform, and the user has sufficent rights, increase |
| 406 // the current process's scheduling priority to a high priority. | 408 // the current process's scheduling priority to a high priority. |
| 407 void RaiseProcessToHighPriority(); | 409 void RaiseProcessToHighPriority(); |
| 408 | 410 |
| 409 } // namespace base | 411 } // namespace base |
| 410 | 412 |
| 411 #endif // BASE_PROCESS_UTIL_H_ | 413 #endif // BASE_PROCESS_UTIL_H_ |
| OLD | NEW |