Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/essentials.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ static inline void do_not_optimize_away(T&& value) {
[[maybe_unused]] static uint64_t maxrss_in_bytes() {
struct rusage ru;
if (getrusage(RUSAGE_SELF, &ru) == 0) {
// NOTE: ru_maxrss is in kilobytes on Linux, but not on Apple...
// NOTE: ru_maxrss is in kibibytes on Linux, but not on Apple...
#ifdef __APPLE__
return ru.ru_maxrss;
#endif
return ru.ru_maxrss * 1000;
return ru.ru_maxrss * 1024;
}
return 0;
}
Expand Down
Loading