This is from man getrusage
struct rusage {
struct timeval ru_utime; /* user time used */
struct timeval ru_stime; /* system time used */
The man page says:
ru_maxrss
(since Linux 2.6.32)This is the maximum resident set size used (in kilobytes). For RUSAGE_CHILDREN, this is the resident set size of the largest child, not the maximum resident set size of the process tree.
So, it's expressed in kilobytes, just like in BSD.
It's not a standard field for the rusage
structure so POSIX doesn't mandate anything about it. But on Linux
ru_maxrss
(since Linux 2.6.32)This is the maximum resident set size used (in kilobytes). For RUSAGE_CHILDREN, this is the resident set size of the largest child, not the maximum resident set size of the process tree.