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

Unified Diff: runtime/bin/process.cc

Issue 2997013002: Refactor of the GetEmbedderInformation APIs (Closed)
Patch Set: Created 3 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
« runtime/bin/embedded_dart_io.h ('K') | « runtime/bin/process.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/process.cc
diff --git a/runtime/bin/process.cc b/runtime/bin/process.cc
index 6c5171c1145f6f01dbf744b1741fd113f717aece..9770f73d8fd470eaa5e4591b1bf09522d376f95a 100644
--- a/runtime/bin/process.cc
+++ b/runtime/bin/process.cc
@@ -369,6 +369,14 @@ void FUNCTION_NAME(ProcessInfo_MaxRSS)(Dart_NativeArguments args) {
Dart_SetIntegerReturnValue(args, max_rss);
}
+void Process::GetRSSInformation(uintptr_t* max, uintptr_t* current) {
zra 2017/08/16 16:13:52 max and current should be int64_t. The types of th
cbernaschina 2017/08/16 17:54:54 Done.
+ int64_t max_rss = Process::MaxRSS();
zra 2017/08/16 16:13:52 ASSERT((max != NULL) && (current != NULL));
cbernaschina 2017/08/16 17:54:54 Done To have more precise assertions ASSERT(max
+ int64_t current_rss = Process::CurrentRSS();
+
+ *max = max_rss >= 0 ? max_rss : 0;
+ *current = current_rss >= 0 ? current_rss : 0;
+}
+
} // namespace bin
} // namespace dart
« runtime/bin/embedded_dart_io.h ('K') | « runtime/bin/process.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698