RFR: 8253638: Cleanup os::reserve_memory and remove MAP_FIXED

Stefan Karlsson stefank at openjdk.java.net
Fri Sep 25 13:49:49 UTC 2020


On Fri, 25 Sep 2020 13:37:01 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> IMHO, the above code is a bug. The JVM could have been launched through JNI and we might have other threads
>> reserving/committing memory. I'm inclined to file a bug about that.
>
> Yes. But there is no other way to do this at this level (if the intent is to split reserved memory and then be able to
> delete each mapping separately).
> This is used in ReservedSpace::first/last_part, and most users of that API do not care about independent unmapping, for
> most of them this is just a way to split an address range. Only exception is CDS which uses it to reserve a large range
> and then place both CDS and metaspace into them; that coding would have to be rewritten if we do away with
> split_reserved_memory().

I created JDK-8253649.

>> I had the same thought, but found some paths were it wasn't obvious to me. That's why I left the comment above, hoping
>> to get some reaction out from it. Could we look into this as a separate patch?
>
> Of course.

Created JDK-8253650.

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

PR: https://git.openjdk.java.net/jdk/pull/357


More information about the hotspot-dev mailing list