RFR: 8224871: os::attempt_reserve_memory_at() tries too hard
Per Liden
per.liden at oracle.com
Tue Jun 4 08:02:44 UTC 2019
Looks good.
/Per
On 5/28/19 3:07 PM, Erik Österlund wrote:
> Hi,
>
> The os::attempt_reserve_memory_at() function on BSD, linux and Solaris
> all try a bit too hard. They first try to mmap memory at a given
> address. If that failed, rather than giving up as expected, it tries in
> a loop to mmap random memory (without address hints), and looks if it so
> happens to be that it can from these completely random and arbitrary
> address ranges find overlapping ranges that happen to cross over the
> exact range that was requested, and then cuts out the excess and returns
> that. We really should just give up instead if the OS refused to hand
> out memory at the requested address.
>
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8224871
>
> Webrev:
> http://cr.openjdk.java.net/~eosterlund/8224871/webrev.00/
>
> Thanks,
> /Erik
More information about the hotspot-runtime-dev
mailing list