RFR: 8364248: Separate memory limit detection from determining its size [v4]
Joel Sikström
jsikstro at openjdk.org
Thu Jul 31 07:59:56 UTC 2025
On Thu, 31 Jul 2025 05:19:15 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Joel Sikström has updated the pull request incrementally with one additional commit since the last revision:
>>
>> os:: unification in allocatable_memory_limit
>
> src/hotspot/os/posix/os_posix.cpp line 813:
>
>> 811:
>> 812: // No limit
>> 813: return SIZE_MAX;
>
> This would be a very nice place to hook in the function I proposed you add, the sister function to `os::vm_min_address()`, let's call it `os::vm_max_address()`.
>
> Looking through the ZGC sources, this is the functionality I meant: https://github.com/openjdk/jdk/blob/559795b0eb8061325127fa9fdf8b80617fe47166/src/hotspot/cpu/aarch64/gc/z/zAddress_aarch64.cpp#L45
>
> For platforms that don't have that implementation, you can still return SIZE_MAX as fallback.
Yes, this could be nice to have in the future, and would likely be a larger re-write.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26530#discussion_r2244642891
More information about the hotspot-gc-dev
mailing list