RFR(S): 8025942: Implement os::Bsd:available_memory
    Gerard Ziemski 
    gerard.ziemski at oracle.com
       
    Thu Oct 10 12:50:24 PDT 2013
    
    
  
hi Dmitry,
Why should we move it into '#else' clause?
host_statistics64 can fail in theory, so from code coverage point of 
view it's useful to have the variable initialized to some 'sane' value, 
otherwise we would need to initialize it something and then we need to 
answer the question - what should it be initialized to? And in that case 
a reasonable value would be what it currently is.
cheers
On 10/10/2013 2:36 PM, Dmitry Samersoff wrote:
> Gerard,
>
> Please move
>
> uint64_t available = physical_memory() >> 2;
>
> under #else
>
> Besides that looks good for me
>
> -Dmitry
>
>
> On 2013-10-10 23:14, Gerard Ziemski wrote:
>> Please review this fix that implements os::Bsd:available_memory()
>>
>> Description:
>>
>> This is a simple change - we use a similar implementation that Apple
>> itself uses (see
>> http://opensource.apple.com/source/system_cmds/system_cmds-498.2/vm_stat.tproj/vm_stat.c)
>> to implement BSD (Apple platform only) implementation for finding out
>> available (free) memory.
>>
>>
>> Testing:
>>
>> Passed JPRT, vm quicklooks
>>
>>
>> References:
>>
>> http://cr.openjdk.java.net/~dsamersoff/sponsorship/gziemski/JDK-8025942/webrev.01/
>>
>> https://bugs.openjdk.java.net/browse/JDK-8025942
>>
>>
>> cheers
>>
>
    
    
More information about the hotspot-dev
mailing list