Index: lib/Fuzzer/FuzzerUtil.cpp =================================================================== --- lib/Fuzzer/FuzzerUtil.cpp +++ lib/Fuzzer/FuzzerUtil.cpp @@ -273,7 +273,15 @@ struct rusage usage; if (getrusage(RUSAGE_SELF, &usage)) return 0; +#ifdef __linux__ + // ru_maxrss is in KiB return usage.ru_maxrss >> 10; +#elif __APPLE__ + // ru_maxrss is in bytes + return usage.ru_maxrss >> 20; +#else +#error "GetPeakRSSMb() is not implemented for your platform" +#endif } } // namespace fuzzer