Skip to content

Commit fca9005

Browse files
committed
report: fix typos in memory limit units
Replace "kbytes" with "bytes" in `PrintSystemInformation()` in `src/node_report.cc`, as RLIMIT_DATA, RLIMIT_RSS, and RLIMIT_AS are given in bytes. Refs: https://www.ibm.com/docs/en/aix/7.3?topic=k-kgetrlimit64-kernel-service
1 parent b5eb77f commit fca9005

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

doc/api/report.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ is provided below for reference.
414414
"soft": "",
415415
"hard": "unlimited"
416416
},
417-
"data_seg_size_kbytes": {
417+
"data_seg_size_bytes": {
418418
"soft": "unlimited",
419419
"hard": "unlimited"
420420
},
@@ -426,7 +426,7 @@ is provided below for reference.
426426
"soft": "unlimited",
427427
"hard": 65536
428428
},
429-
"max_memory_size_kbytes": {
429+
"max_memory_size_bytes": {
430430
"soft": "unlimited",
431431
"hard": "unlimited"
432432
},
@@ -446,7 +446,7 @@ is provided below for reference.
446446
"soft": "unlimited",
447447
"hard": 4127290
448448
},
449-
"virtual_memory_kbytes": {
449+
"virtual_memory_bytes": {
450450
"soft": "unlimited",
451451
"hard": "unlimited"
452452
}

src/node_report.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -732,13 +732,13 @@ static void PrintSystemInformation(JSONWriter* writer) {
732732
int id;
733733
} rlimit_strings[] = {
734734
{"core_file_size_blocks", RLIMIT_CORE},
735-
{"data_seg_size_kbytes", RLIMIT_DATA},
735+
{"data_seg_size_bytes", RLIMIT_DATA},
736736
{"file_size_blocks", RLIMIT_FSIZE},
737737
#if !(defined(_AIX) || defined(__sun))
738738
{"max_locked_memory_bytes", RLIMIT_MEMLOCK},
739739
#endif
740740
#ifndef __sun
741-
{"max_memory_size_kbytes", RLIMIT_RSS},
741+
{"max_memory_size_bytes", RLIMIT_RSS},
742742
#endif
743743
{"open_files", RLIMIT_NOFILE},
744744
{"stack_size_bytes", RLIMIT_STACK},
@@ -747,7 +747,7 @@ static void PrintSystemInformation(JSONWriter* writer) {
747747
{"max_user_processes", RLIMIT_NPROC},
748748
#endif
749749
#ifndef __OpenBSD__
750-
{"virtual_memory_kbytes", RLIMIT_AS}
750+
{"virtual_memory_bytes", RLIMIT_AS}
751751
#endif
752752
};
753753

test/common/report.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,11 +309,11 @@ function _validateContent(report, fields = []) {
309309

310310
// Verify the format of the userLimits section on non-Windows platforms.
311311
if (!isWindows) {
312-
const userLimitsFields = ['core_file_size_blocks', 'data_seg_size_kbytes',
312+
const userLimitsFields = ['core_file_size_blocks', 'data_seg_size_bytes',
313313
'file_size_blocks', 'max_locked_memory_bytes',
314-
'max_memory_size_kbytes', 'open_files',
314+
'max_memory_size_bytes', 'open_files',
315315
'stack_size_bytes', 'cpu_time_seconds',
316-
'max_user_processes', 'virtual_memory_kbytes'];
316+
'max_user_processes', 'virtual_memory_bytes'];
317317
checkForUnknownFields(report.userLimits, userLimitsFields);
318318
for (const [type, limits] of Object.entries(report.userLimits)) {
319319
assert.strictEqual(typeof type, 'string');

0 commit comments

Comments
 (0)