Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2147)

Unified Diff: base/process_util_win.cc

Issue 113217: Add memory stats for linux page cycler. On linux, we collect (Closed)
Patch Set: close process Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/process_util_mac.mm ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « base/process_util_mac.mm ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698