Index: runtime/vm/os_macos.cc |
diff --git a/runtime/vm/os_macos.cc b/runtime/vm/os_macos.cc |
index f8ea9ab35e992f85ca7e9907cab1739623a95fbd..25e36162a16f0fee22c9757868d8d5d26345791c 100644 |
--- a/runtime/vm/os_macos.cc |
+++ b/runtime/vm/os_macos.cc |
@@ -200,6 +200,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; |
+} |
+ |
void OS::Sleep(int64_t millis) { |
int64_t micros = millis * kMicrosecondsPerMillisecond; |
SleepMicros(micros); |