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

Joel Sikström jsikstro at openjdk.org
Wed Aug 20 15:43:59 UTC 2025


On Tue, 5 Aug 2025 05:12:11 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Anton Artemov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 26 commits:
>> 
>>  - 8357086: Addressed reviewer's comments
>>  - Merge remote-tracking branch 'origin/master' into JDK-8357086_size_t_memfuncs
>>  - 8357086: Fixed merge conflict
>>  - 8357086: Removed extra line
>>  - 8357086: Made physical_memory() return size_t, added dummy ATTRIBUTE_NODISCARD
>>  - 8357086: Small fixes
>>  - 8357086: Made physical_memory() return void
>>  - 8357086: Fixed behavior of total_swap_space on Linux
>>  - 8357086: Addressed reviewer's comments.
>>  - 8357086: Fixed void conversion.
>>  - ... and 16 more: https://git.openjdk.org/jdk/compare/57553ca1...a3898f43
>
> src/hotspot/share/runtime/os.hpp line 343:
> 
>> 341: 
>> 342:   static size_t physical_memory();
>> 343:   static bool has_allocatable_memory_limit(size_t* limit);
> 
> Future cleanup: for consistency should this now also take a reference?

This is no longer relevant as it has been re-worked in [JDK-8364248](https://bugs.openjdk.org/browse/JDK-8364248) to not have an out-parameter and renamed to `static size_t commit_memory_limit()`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25450#discussion_r2288574114


More information about the hotspot-dev mailing list