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

Unified Diff: runtime/bin/process_patch.dart

Issue 2822943002: [dart:io] Adds ProcessInfo.{max,current}Rss. Adds OS::MaxRSS on Fuchsia. (Closed)
Patch Set: Cleanup Created 3 years, 8 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/bin/process_patch.dart
diff --git a/runtime/bin/process_patch.dart b/runtime/bin/process_patch.dart
index 03c0462f2b9b85fda3f5cde74549b09ce2e31331..a4bd45135993bca68f99b1a1f6c682e10fe2702a 100644
--- a/runtime/bin/process_patch.dart
+++ b/runtime/bin/process_patch.dart
@@ -165,6 +165,30 @@ class _ProcessUtils {
}
}
+@patch
+class ProcessInfo {
+ @patch
+ static int get maxRss {
+ var result = _maxRss();
+ if (result is OSError) {
+ throw result;
+ }
+ return result;
+ }
+
+ @patch
+ static int get currentRss {
+ var result = _currentRss();
+ if (result is OSError) {
+ throw result;
+ }
+ return result;
+ }
+
+ static _maxRss() native "ProcessInfo_MaxRSS";
+ static _currentRss() native "ProcessInfo_CurrentRSS";
+}
+
class _ProcessStartStatus {
int _errorCode; // Set to OS error code if process start failed.
String _errorMessage; // Set to OS error message if process start failed.

Powered by Google App Engine
This is Rietveld 408576698