RFR: 8357086: os::xxx functions returning memory size should return size_t [v3]
Anton Artemov
duke at openjdk.org
Fri May 30 09:04:51 UTC 2025
On Thu, 29 May 2025 06:37:36 GMT, David Holmes <dholmes at openjdk.org> wrote:
> I couldn't spot these - do you have a link please? It is annoying this prevents use of `ssize_t`.
In osContainer_linux.hpp there is `OSCONTAINER_ERROR` defined with value -2. This may be returned, for instance, in `OSContainer::memory_and_swap_limit_in_bytes() `, which unrolls to `jlong CgroupV1MemoryController::memory_and_swap_limit_in_bytes(julong host_mem, julong host_swap)`, and there is a call to `read_memory_limit_in_bytes(host_mem)`, and that method can return the error code. This event will be logged, but the value will be returned anyway.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25450#issuecomment-2921698547
More information about the hotspot-dev
mailing list