Closed hanwentao closed 6 months ago
Thanks for reporting this! This issue is interesting.
According to the manpage of getrusage on macOS, ru_maxrss is in bytes, which contradicts the statement in nix's doc.
The online man page, says it is in kilobytes. But a newer version of man pages (extracted from Xcode by a community user), says that it is in bytes.
I guess that Apple changed this interface in a specific version, a rough search leads me to this post, it seems that this change has been made for more than 4 years.
According to the manpage of
getrusage
on macOS,ru_maxrss
is in bytes, which contradicts the statement in nix's doc.Quote from
man getrusage
on macOS:nix's doc on
Usage
: