diff options
Diffstat (limited to 'tools/ProcStats.cpp')
-rw-r--r-- | tools/ProcStats.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/ProcStats.cpp b/tools/ProcStats.cpp index 94660394f8..eaa1379301 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; } |