| Index: tools/ProcStats.cpp
|
| diff --git a/tools/ProcStats.cpp b/tools/ProcStats.cpp
|
| index 94660394f8997143edb5e1daf74882291d6c013a..eaa1379301833cb28e218345e7d6d31c95863bb8 100644
|
| --- a/tools/ProcStats.cpp
|
| +++ b/tools/ProcStats.cpp
|
| @@ -12,19 +12,19 @@
|
| defined(SK_BUILD_FOR_ANDROID)
|
|
|
| #include <sys/resource.h>
|
| - int sk_tools::getMaxResidentSetSizeKB() {
|
| + int sk_tools::getMaxResidentSetSizeMB() {
|
| struct rusage ru;
|
| getrusage(RUSAGE_SELF, &ru);
|
| #if defined(SK_BUILD_FOR_MAC)
|
| - return static_cast<int>(ru.ru_maxrss / 1024); // Darwin reports bytes.
|
| + return static_cast<int>(ru.ru_maxrss / 1024 / 1024); // Darwin reports bytes.
|
| #else
|
| - return static_cast<int>(ru.ru_maxrss); // Linux reports kilobytes.
|
| + return static_cast<int>(ru.ru_maxrss / 1024); // Linux reports kilobytes.
|
| #endif
|
| }
|
|
|
| #else
|
|
|
| - int sk_tools::getMaxResidentSetSizeKB() {
|
| + int sk_tools::getMaxResidentSetSizeMB() {
|
| return -1;
|
| }
|
|
|
|
|