RFR: 8364248: Separate memory limit detection

Joel Sikström jsikstro at openjdk.org
Tue Jul 29 13:14:55 UTC 2025


On Tue, 29 Jul 2025 12:44:51 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> Generally good. But why not simply return the limit. Unlimited = size_max.
> 
> Oh, I see ZGC does that already. I would adopt that for has_limited_virtual_address_space. Then you can remove the ZGC implementation completely.

This would make the ZGC could read more nicely I think. I like it!

> Side note, to be unbearably nitpicky, it should theoretically be "address space limit - os::vm_min_address()" since the OS does not allow low-address mappings below that.

Do you think it would be prudent to add this now? To clarify, if there is a limit on POSIX, return `(size_t)rlim.rlim_cur - vm_min_address()`?

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

PR Comment: https://git.openjdk.org/jdk/pull/26530#issuecomment-3132483693


More information about the hotspot-gc-dev mailing list