Skip to contentSkip to conversation

man/man2/getrusage.2: clarify ru_maxrss unit as kibibytes (KiB)

PATCH In review Your Name 4 participants 7 messages Aug 18, 2025 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore

Your Name

author
#0 lore raw

PATCH 1/1 man/man2/getrusage.2: clarify ru_maxrss unit as kibibytes (KiB)

From: Alex Yang <[email protected]>

The ru_maxrss field was previously documented as using "kilobytes" as its unit. However, the value is actually in multiples of 1024 bytes, which is correctly referred to as "kibibytes" (KiB) according to the IEC standard. This change updates the documentation to use the precise term.

Reference:
https://en.wikipedia.org/wiki/Kibibyte

---
 man/man2/getrusage.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/getrusage.2 +1 -1
index 34e81f540..13c405d0e 100644
@@ -88,7 +88,7 @@ expressed in a
 structure (seconds plus microseconds).
 .TP
 .IR ru_maxrss " (since Linux 2.6.32)"
-This is the maximum resident set size used (in kilobytes).
+This is the maximum resident set size used (in kibibytes).
 For
 .BR RUSAGE_CHILDREN ,
 this is the resident set size of the largest child, not the maximum
Signature · 1 line
2.39.5 (Apple Git-154)
#1 lore raw

Hi Alex,

Quoted 15 lines · Your Name

From: Alex Yang <[email protected]>

The ru_maxrss field was previously documented as using "kilobytes" as its unit. However, the value is actually in multiples of 1024 bytes, which is correctly referred to as "kibibytes" (KiB) according to the IEC standard. This change updates the documentation to use the precise term.

Reference:
https://en.wikipedia.org/wiki/Kibibyte

---
 man/man2/getrusage.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/getrusage.2 +0 -0
index 34e81f540..13c405d0e 100644

man/man2/getrusage.2 expressed in a · line 91

Quoted 5 lines
man/man2/getrusage.2 +1 -1
@@ -88,7 +88,7 @@ expressed in a
 structure (seconds plus microseconds).
 .TP
 .IR ru_maxrss " (since Linux 2.6.32)"
-This is the maximum resident set size used (in kilobytes).
+This is the maximum resident set size used (in kibibytes).

Should we maybe say this?

	(in KiB).

I personally am fine with kibibytes (it's even documented in units(7)). However, in the past, I've met many people that didn't know the term existed. KiB is more widely known.

What do you think?

Have a lovely day!
Alex

Quoted 6 lines
man/man2/getrusage.2 +0 -0
 For
 .BR RUSAGE_CHILDREN ,
 this is the resident set size of the largest child, not the maximum
Signature · 1 line
2.39.5 (Apple Git-154)
Signature · 1 line
<https://www.alejandro-colomar.es/>
#2 lore raw
Quoted 6 lines · Alejandro Colomar

man/man2/getrusage.2 expressed in a · line 91

Quoted 2 lines
man/man2/getrusage.2 +1 -1
-This is the maximum resident set size used (in kilobytes).
+This is the maximum resident set size used (in kibibytes).

Should we maybe say this?

	(in KiB).

This sounds better to me based on it's use elsewhere:

    $ grep --exclude-dir=.git -rl 'KiB'
    man/man2/ioctl_fsmap.2
    man/man2/process_vm_readv.2
    man/man2/readv.2
    man/man2/alloc_hugepages.2
    man/man3/btree.3
    man/man4/fd.4
    man/man5/proc_kcore.5
    man/man5/proc_sys_vm.5
    man/man7/units.7

Writing out the full name of the IEC unit is much less common:

    $ grep --exclude-dir=.git -rl 'kibi'
    man/man2/msgctl.2
    man/man5/tmpfs.5
    man/man7/units.7

Collin

#3 lore raw

Hi Collin, Alex,

Quoted 4 lines · Collin Funk
Quoted 2 lines · Alejandro Colomar

man/man2/getrusage.2 expressed in a · line 91

Quoted 2 lines
man/man2/getrusage.2 +1 -1
-This is the maximum resident set size used (in kilobytes).
+This is the maximum resident set size used (in kibibytes).

BTW, Alex, could you show a link to the relevant source code? Or maybe a small test program that demonstrates this? How do you know it's in KiB and not in KB?

Quoted 9 lines
Quoted 4 lines

Should we maybe say this?

	(in KiB).

This sounds better to me based on it's use elsewhere:

    $ grep --exclude-dir=.git -rl 'KiB'

I often use 'grep regex *' as a simpler way to avoid '.git'. Also, the build system's temporary files are created under .tmp, where I also don't want to search.

Quoted 10 lines
    man/man2/ioctl_fsmap.2
    man/man2/process_vm_readv.2
    man/man2/readv.2
    man/man2/alloc_hugepages.2
    man/man3/btree.3
    man/man4/fd.4
    man/man5/proc_kcore.5
    man/man5/proc_sys_vm.5
    man/man7/units.7
Quoted 6 lines

Writing out the full name of the IEC unit is much less common:

    $ grep --exclude-dir=.git -rl 'kibi'
    man/man2/msgctl.2
    man/man5/tmpfs.5
    man/man7/units.7

Thanks!

Have a lovely day!
Alex

Signature · 1 line
<https://www.alejandro-colomar.es/>
#4 lore raw

PATCH 1/1 man/man2/getrusage.2: clarify ru_maxrss unit as KiB

The ru_maxrss field was previously documented as using "kilobytes" as its unit. However, the value is actually in multiples of 1024 bytes, which is correctly referred to as "kibibytes" (KiB) according to the IEC standard. This change updates the documentation to use the precise term.

---
 man/man2/getrusage.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/getrusage.2 +1 -1
index 34e81f540..a1b30e5b5 100644
@@ -88,7 +88,7 @@ expressed in a
 structure (seconds plus microseconds).
 .TP
 .IR ru_maxrss " (since Linux 2.6.32)"
-This is the maximum resident set size used (in kilobytes).
+This is the maximum resident set size used (in KiB).
 For
 .BR RUSAGE_CHILDREN ,
 this is the resident set size of the largest child, not the maximum
Signature · 1 line
2.50.1
#5 lore raw

Re: [PATCH] man/man2/getrusage.2: clarify ru_maxrss unit as KiB

Hi Alex,

Quoted 1 line · Alex Yang

The ru_maxrss field was previously documented as using "kilobytes" as its unit. However, the value is actually in multiples of 1024 bytes, which is correctly referred to as "kibibytes" (KiB) according to the IEC standard. This change updates the documentation to use the precise term.

Thanks! I have applied the patch.

Have a lovely day!
Alex

Quoted 21 lines
---
 man/man2/getrusage.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/getrusage.2 +1 -1
index 34e81f540..a1b30e5b5 100644
@@ -88,7 +88,7 @@ expressed in a
 structure (seconds plus microseconds).
 .TP
 .IR ru_maxrss " (since Linux 2.6.32)"
-This is the maximum resident set size used (in kilobytes).
+This is the maximum resident set size used (in KiB).
 For
 .BR RUSAGE_CHILDREN ,
 this is the resident set size of the largest child, not the maximum
Signature · 1 line
2.50.1
Signature · 1 line
<https://www.alejandro-colomar.es/>