OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of dart.io; | 5 part of dart.io; |
6 | 6 |
7 // TODO(ager): The only reason for this class is that we | 7 // TODO(ager): The only reason for this class is that we |
8 // cannot patch a top-level at this point. | 8 // cannot patch a top-level at this point. |
9 class _ProcessUtils { | 9 class _ProcessUtils { |
10 external static void _exit(int status); | 10 external static void _exit(int status); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 101 |
102 /** | 102 /** |
103 * [ProcessInfo] provides methods for retrieving information about the | 103 * [ProcessInfo] provides methods for retrieving information about the |
104 * current process. | 104 * current process. |
105 */ | 105 */ |
106 class ProcessInfo { | 106 class ProcessInfo { |
107 /** | 107 /** |
108 * The current resident set size of memory for the process. | 108 * The current resident set size of memory for the process. |
109 * | 109 * |
110 * Note that the meaning of this field is platform dependent. For example, | 110 * Note that the meaning of this field is platform dependent. For example, |
111 * some memory acounted for here may be shared with other processes, or if | 111 * some memory accounted for here may be shared with other processes, or if |
112 * the same page is mapped into a process's address space, it may be counted | 112 * the same page is mapped into a process's address space, it may be counted |
113 * twice. | 113 * twice. |
114 */ | 114 */ |
115 external static int get currentRss; | 115 external static int get currentRss; |
116 | 116 |
117 /** | 117 /** |
118 * The high-watermark in bytes for the resident set size of memory for the | 118 * The high-watermark in bytes for the resident set size of memory for the |
119 * process. | 119 * process. |
120 * | 120 * |
121 * Note that the meaning of this field is platform dependent. For example, | 121 * Note that the meaning of this field is platform dependent. For example, |
122 * some memory acounted for here may be shared with other processes, or if | 122 * some memory accounted for here may be shared with other processes, or if |
123 * the same page is mapped into a process's address space, it may be counted | 123 * the same page is mapped into a process's address space, it may be counted |
124 * twice. | 124 * twice. |
125 */ | 125 */ |
126 external static int get maxRss; | 126 external static int get maxRss; |
127 } | 127 } |
128 | 128 |
129 /** | 129 /** |
130 * Modes for running a new process. | 130 * Modes for running a new process. |
131 */ | 131 */ |
132 enum ProcessStartMode { | 132 enum ProcessStartMode { |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 final int errorCode; | 593 final int errorCode; |
594 | 594 |
595 const ProcessException(this.executable, this.arguments, | 595 const ProcessException(this.executable, this.arguments, |
596 [this.message = "", this.errorCode = 0]); | 596 [this.message = "", this.errorCode = 0]); |
597 String toString() { | 597 String toString() { |
598 var msg = (message == null) ? 'OS error code: $errorCode' : message; | 598 var msg = (message == null) ? 'OS error code: $errorCode' : message; |
599 var args = arguments.join(' '); | 599 var args = arguments.join(' '); |
600 return "ProcessException: $msg\n Command: $executable $args"; | 600 return "ProcessException: $msg\n Command: $executable $args"; |
601 } | 601 } |
602 } | 602 } |
OLD | NEW |