RFR: 8291945: Add OSInfo API for static OS information

Ioi Lam iklam at openjdk.org
Fri Aug 5 05:01:44 UTC 2022


On Fri, 5 Aug 2022 04:17:24 GMT, David Holmes <dholmes at openjdk.org> wrote:

> Seems reasonable, but I initially expected to see the os:: API removed and replaced by the OSInfo:: API, rather than OSInfo just being an internal implementation detail.

I left os::vm_page_size() because:

- It's used by a lot of places. I don't want this PR to be overwhelmed by such changes.
- os::vm_page_size() is often used together with other os::xxx functions related to memory allocation.

So at this point, OSInfo is a just lower-level API if you just want to find out the value of some OS parameters. So far I've used it in two popular headers to avoid including os.hpp

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

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


More information about the hotspot-dev mailing list