Index: runtime/vm/os_linux.cc |
diff --git a/runtime/vm/os_linux.cc b/runtime/vm/os_linux.cc |
index df05e1708fb1a992b76f6ab98325689ff337033d..58efa89840a84e7f7f63c5eed0a18aceaf8aa910 100644 |
--- a/runtime/vm/os_linux.cc |
+++ b/runtime/vm/os_linux.cc |
@@ -260,6 +260,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); |