RFR: JDK-8324598: use mem_unit when working with sysinfo memory and swap related information

Matthias Baesken mbaesken at openjdk.org
Wed Jan 24 10:12:33 UTC 2024


According to the sysinfo manpage ( https://man7.org/linux/man-pages/man2/sysinfo.2.html ) the memory and swap related entries in the struct sysinfo are given as multiples of mem_unit bytes.
"In the above structure, sizes of the memory and swap fields are given as multiples of mem_unit bytes."

This is considered in most parts of the OpenJDK codebase when sysinfo is used but not all; should be added where it is missing.

-------------

Commit messages:
 - JDK-8324598

Changes: https://git.openjdk.org/jdk/pull/17550/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17550&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8324598
  Stats: 3 lines in 2 files changed: 0 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/17550.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17550/head:pull/17550

PR: https://git.openjdk.org/jdk/pull/17550


More information about the core-libs-dev mailing list