RFR: 8353564: Fail fatally if os::release_memory or os::uncommit_memory fails [v2]
Thomas Stuefe
stuefe at openjdk.org
Fri Jan 23 06:54:46 UTC 2026
On Fri, 23 Jan 2026 03:30:02 GMT, Robert Toyonaga <duke at openjdk.org> wrote:
> Thank you everyone for the feedback!
>
> I've removed the error strings now.
>
> > os::unmap_memory only returns true now. Is there a reason why the return value type of this function is not changed?
>
> Yes, they can all return void now. I've made the change and updated the callers where necessary too.
>
> > Much more sense would be to (in a separate PR) highlight the fact in the hs-err file that this particular native OOM may have been caused by running against the mapping limit, and that increasing said limit may help. Maybe we do this already, not sure.
>
> How about if I added that note in the fatal error message in `os::uncommit_memory`? I think then that note should also show up in the hs_err file.
Sure, that would work, but this would be highly Linux-specific. So, would need ifdefs.
Wait, the failing code is OS specific, too. So, okay :-)
You need to do this for ENOMEM only then.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29240#issuecomment-3788609565
More information about the hotspot-dev
mailing list