| Index: runtime/bin/process.cc
|
| diff --git a/runtime/bin/process.cc b/runtime/bin/process.cc
|
| index 80133289d3141ced18f0c5a6b77d6c58a02d28d7..ab2b9ace9d46b0dda925f0aa0d5531b430b64120 100644
|
| --- a/runtime/bin/process.cc
|
| +++ b/runtime/bin/process.cc
|
| @@ -366,6 +366,26 @@ void FUNCTION_NAME(StringToSystemEncoding)(Dart_NativeArguments args) {
|
| Dart_SetReturnValue(args, external_array);
|
| }
|
|
|
| +
|
| +void FUNCTION_NAME(ProcessInfo_CurrentRSS)(Dart_NativeArguments args) {
|
| + int64_t current_rss = Process::CurrentRSS();
|
| + if (current_rss < 0) {
|
| + Dart_SetReturnValue(args, DartUtils::NewDartOSError());
|
| + return;
|
| + }
|
| + Dart_SetIntegerReturnValue(args, current_rss);
|
| +}
|
| +
|
| +
|
| +void FUNCTION_NAME(ProcessInfo_MaxRSS)(Dart_NativeArguments args) {
|
| + int64_t max_rss = Process::MaxRSS();
|
| + if (max_rss < 0) {
|
| + Dart_SetReturnValue(args, DartUtils::NewDartOSError());
|
| + return;
|
| + }
|
| + Dart_SetIntegerReturnValue(args, max_rss);
|
| +}
|
| +
|
| } // namespace bin
|
| } // namespace dart
|
|
|
|
|