Implement maxrss for Windows
No more -1 in the first column on Windows! E.g. http://build.chromium.org/p/client.skia/builders/Perf-Win8-ShuttleA-HD7770-x86_64-Release-Trybot/builds/0/steps/nanobench/logs/stdio BUG=skia: Review URL: https://codereview.chromium.org/661413004
This commit is contained in:
parent
e9e0dea15b
commit
9abf4f82a8
@ -22,8 +22,16 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
#else
|
||||
#elif defined(SK_BUILD_FOR_WIN32)
|
||||
#include <windows.h>
|
||||
#include <psapi.h>
|
||||
int sk_tools::getMaxResidentSetSizeMB() {
|
||||
PROCESS_MEMORY_COUNTERS info;
|
||||
GetProcessMemoryInfo(GetCurrentProcess(), &info, sizeof(info));
|
||||
return static_cast<int>(info.PeakWorkingSetSize / 1024 / 1024); // Windows reports bytes.
|
||||
}
|
||||
|
||||
#else
|
||||
int sk_tools::getMaxResidentSetSizeMB() {
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user