Index: runtime/vm/os_android.cc |
diff --git a/runtime/vm/os_android.cc b/runtime/vm/os_android.cc |
index 89cfbe9312199a09e56d2261321560101a95a007..c7cc8c5f7d1db777ba86cfb9cfcb98eaf1409d46 100644 |
--- a/runtime/vm/os_android.cc |
+++ b/runtime/vm/os_android.cc |
@@ -251,6 +251,15 @@ int OS::NumberOfAvailableProcessors() { |
} |
+uintptr_t OS::MaxRSS() { |
+ struct rusage usage; |
+ usage.ru_maxrss = 0; |
+ int r = getrusage(RUSAGE_SELF, &usage); |
+ ASSERT(r == 0); |
+ return usage.ru_maxrss * KB; |
+} |
+ |
+ |
void OS::Sleep(int64_t millis) { |
int64_t micros = millis * kMicrosecondsPerMillisecond; |
SleepMicros(micros); |