RFR(S): 8025942: Implement os::Bsd:available_memory

David Holmes david.holmes at oracle.com
Thu Oct 10 21:32:31 PDT 2013


Hi Gerard,

On 11/10/2013 5:14 AM, 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.

Is host_statistics64 likely to fail? If not then I think we should trap 
any failures, at least with an assert, so that they are noticed. 
Otherwise this might fail all the time and we would be none the wiser.

Thanks,
David

>
> 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