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

Unified Diff: sdk/lib/io/process.dart

Issue 2822943002: [dart:io] Adds ProcessInfo.{max,current}Rss. Adds OS::MaxRSS on Fuchsia. (Closed)
Patch Set: Fix Fuchsia build 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: sdk/lib/io/process.dart
diff --git a/sdk/lib/io/process.dart b/sdk/lib/io/process.dart
index 5bc531e45b2c3b99170934f37aced6ebac641801..bfe1c505139dcd1b46d82aa2c2d8eac85919bf29 100644
--- a/sdk/lib/io/process.dart
+++ b/sdk/lib/io/process.dart
@@ -100,6 +100,33 @@ void sleep(Duration duration) {
int get pid => _ProcessUtils._pid(null);
/**
+ * [ProcessInfo] provides methods for retrieving information about the
+ * current process.
+ */
+class ProcessInfo {
+ /**
+ * The current resident set size of memory for the process.
+ *
+ * Note that the meaning of this field is platform dependent. For example,
+ * some memory acounted for here may be shared with other processes, or if
+ * the same page is mapped into a process's address space, it may be counted
+ * twice.
+ */
+ external static int get currentRss;
+
+ /**
+ * The high-watermark in bytes for the resident set size of memory for the
+ * process.
+ *
+ * Note that the meaning of this field is platform dependent. For example,
+ * some memory acounted for here may be shared with other processes, or if
+ * the same page is mapped into a process's address space, it may be counted
+ * twice.
+ */
+ external static int get maxRss;
+}
+
+/**
* Modes for running a new process.
*/
enum ProcessStartMode {

Powered by Google App Engine
This is Rietveld 408576698