Index: runtime/vm/os_linux.cc |
diff --git a/runtime/vm/os_linux.cc b/runtime/vm/os_linux.cc |
index 3722ff077606097b88b62bfb1d0f928f13c56b1a..ccbc7e51e4f07abe06506e8e625c7e1bb01f1903 100644 |
--- a/runtime/vm/os_linux.cc |
+++ b/runtime/vm/os_linux.cc |
@@ -221,6 +221,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); |