RFR: 8357086: os::xxx functions returning memory size should return size_t [v3]

Stefan Karlsson stefank at openjdk.org
Thu Jun 12 07:05:31 UTC 2025


On Wed, 11 Jun 2025 19:17:24 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> D) a separate error reporting variable. It feels a bit overengineered, though.

I think I disagree with this. The status quo makes it all too easy to miss that you need to check the return value for an error. IMHO, this is a growing ground for bugs when someone starts to use any of these APIs with realizing that we're mixing two values (and two types) into one return value. Just 2c, to reiterate that *I* wouldn't mind a solution like this.

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

PR Comment: https://git.openjdk.org/jdk/pull/25450#issuecomment-2965369908


More information about the hotspot-dev mailing list