RFR: 8305770: os::Linux::available_memory() should refer MemAvailable in /proc/meminfo [v2]
David Holmes
dholmes at openjdk.org
Tue May 9 01:46:30 UTC 2023
On Mon, 8 May 2023 08:42:53 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:
>> Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Introduce os::free_memory
>
> src/hotspot/share/runtime/os.hpp line 314:
>
>> 312:
>> 313: static julong available_memory();
>> 314: static julong free_memory();
>
> It would probably be a good idea to add a comment describing what the actual difference is between free/available (i.e. Linux only and usually `available memory > free memory` on such systems).
Yes some detailed commentary is very necessary. It looks very odd to have two functions that do the same thing on every platform but Linux.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13398#discussion_r1188033176
More information about the hotspot-compiler-dev
mailing list