On Tue, 1 Dec 2026 12:25:02 GMT, Markus Grönlund <[email protected]> wrote:

>> Erik Österlund has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Axel comments
>
> src/hotspot/os/windows/os_windows.cpp line 979:
> 
>> 977:   }
>> 978: 
>> 979:   const physical_memory_size_type total = physical_memory();
> 
> Invert the order of these two.
> 
> Query the cache first, then read free memory with GlobalMemoryStatusEx() 
> immediately before combining them.
> 
> That avoids holding an older free-memory value across potentially slow PDH 
> initialization or collection. It reduces sampling skew, though the two 
> readings still aren’t an atomic snapshot.

Good idea. Fixed!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33895#discussion_r4754724452

Reply via email to