getrusage
returns a struct containing
long ru_maxrss; /* max resident set size */
What are the units of ru_maxrss
, on BSD operating systems? Is this value in bytes, or in kilobytes? By "BSD", I mean FreeBSD, OpenBSD, but not Mac OS X / Darwin.
The FreeBSD man page and OpenBSD man page say the units are in kilobytes:
ru_maxrss the maximum resident set size utilized (in kilobytes).
However, I know that on Darwin / Mac OS X, the units are in bytes (even though online man pages claim otherwise), and I have also found some statements online that claim on BSD ru_maxrss
is also returned in bytes (see e.g. here). Which is correct?