Index: runtime/vm/os_android.cc |
diff --git a/runtime/vm/os_android.cc b/runtime/vm/os_android.cc |
index 77357507ff3cc82907b68f3738374f62aa2c915a..d9da8d46fb38b18ff7f8fa32ca15c3e7ad2727fc 100644 |
--- a/runtime/vm/os_android.cc |
+++ b/runtime/vm/os_android.cc |
@@ -214,6 +214,14 @@ int OS::NumberOfAvailableProcessors() { |
return sysconf(_SC_NPROCESSORS_ONLN); |
} |
+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); |