RFR: 8357086: os::xxx functions returning memory size should return size_t [v23]
Anton Artemov
duke at openjdk.org
Mon Aug 4 18:24:09 UTC 2025
On Mon, 4 Aug 2025 07:41:03 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 24 commits:
>>
>> - 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.
>> - 8357086: Addressed reviewer's comments
>> - 8357086: Addressed reviewer's comments
>> - ... and 14 more: https://git.openjdk.org/jdk/compare/d80b5c87...f9b2c6d8
>
> src/hotspot/share/runtime/arguments.cpp line 1507:
>
>> 1505: void Arguments::set_heap_size() {
>> 1506: julong phys_mem;
>> 1507: size_t physical_mem_val = 0;
>
> I'm not seeing why you needed to introduce this as a temporary. ??
This is a leftover from the latest change `os::physical_memory(size_t& val) -> size_t os::physical_memory()`. Addressed in the latest commit.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25450#discussion_r2250811229
More information about the hotspot-dev
mailing list