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

Unified Diff: runtime/vm/os_win.cc

Issue 2250793004: Observatory: Report peak process memory usage. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 4 years, 4 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 | « runtime/vm/os_macos.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/os_win.cc
diff --git a/runtime/vm/os_win.cc b/runtime/vm/os_win.cc
index 7236a9164959810a6bf96c85f5786aed3f8adc1a..1bf89bd4a278eb598da919e658f356e2190ec5bd 100644
--- a/runtime/vm/os_win.cc
+++ b/runtime/vm/os_win.cc
@@ -9,6 +9,7 @@
#include <malloc.h> // NOLINT
#include <process.h> // NOLINT
+#include <psapi.h> // NOLINT
#include <time.h> // NOLINT
#include "platform/utils.h"
@@ -235,6 +236,13 @@ int OS::NumberOfAvailableProcessors() {
}
+uinptr_t OS::MaxRSS() {
+ PROCESS_MEMORY_COUNTERS pmc;
+ GetProcessMemoryInfo(GetCurrentProcess(), &pmc, sizeof(pmc));
+ return pmc.PeakWorkingSetSize;
+}
+
+
void OS::Sleep(int64_t millis) {
::Sleep(millis);
}
« no previous file with comments | « runtime/vm/os_macos.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698