RFR: 8305770: os::Linux::available_memory() should refer MemAvailable in /proc/meminfo
    Yasumasa Suenaga 
    ysuenaga at openjdk.org
       
    Wed Apr 26 14:30:27 UTC 2023
    
    
  
On Wed, 26 Apr 2023 13:45:50 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:
> > We could also just bypass the compiler thread creation question for now. Let the compiler continue to use the old metric when calculating its thread count, but let all other users of os::available_memory() the new one.
> 
> I agree, this could be the most pragmatic way forward.
Ok, so how do we implement that? It is better to add that function to `os` class like `os::free_memory()`, but it affects all of supported platforms. I think we can add static function for get "free memory" to compilerBroker.cpp . If it runs on Linux, it returns old metric, otherwise it delegates to `os::available_memory()`. Is it ok?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13398#issuecomment-1523501016
    
    
More information about the hotspot-runtime-dev
mailing list