Chromium Code Reviews| 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 |