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

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: Windows include 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
Index: runtime/vm/os_win.cc
diff --git a/runtime/vm/os_win.cc b/runtime/vm/os_win.cc
index 7236a9164959810a6bf96c85f5786aed3f8adc1a..d6c3c9fda0859c9527847d9f84b3dc704ee53f30 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::MaxRSSinKB() {
+ PROCESS_MEMORY_COUNTERS pmc;
+ GetProcessMemoryInfo(GetCurrentProcess(), &pmc, sizeof(pmc));
+ return pmc.PeakWorkingSetSize;
+}
+
+
void OS::Sleep(int64_t millis) {
::Sleep(millis);
}
« runtime/vm/os_macos.cc ('K') | « 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