| Index: base/process_util_win.cc
|
| diff --git a/base/process_util_win.cc b/base/process_util_win.cc
|
| index 265c26f03b09d3ea53b6c4af28ce0b1fe80fbdee..8b9ede863152a5aef885aa86f35a3b5046cad5b1 100644
|
| --- a/base/process_util_win.cc
|
| +++ b/base/process_util_win.cc
|
| @@ -520,6 +520,15 @@ size_t ProcessMetrics::GetWorkingSetSize() const {
|
| return 0;
|
| }
|
|
|
| +// Returns the peak working set size, in bytes.
|
| +size_t ProcessMetrics::GetPeakWorkingSetSize() const {
|
| + PROCESS_MEMORY_COUNTERS pmc;
|
| + if (GetProcessMemoryInfo(process_, &pmc, sizeof(pmc))) {
|
| + return pmc.PeakWorkingSetSize;
|
| + }
|
| + return 0;
|
| +}
|
| +
|
| size_t ProcessMetrics::GetPrivateBytes() const {
|
| // PROCESS_MEMORY_COUNTERS_EX is not supported until XP SP2.
|
| // GetProcessMemoryInfo() will simply fail on prior OS. So the requested
|
|
|