RFR: 8281946: VM.native_memory should report size of shareable memory [v3]

Ioi Lam iklam at openjdk.org
Tue Dec 6 20:58:10 UTC 2022


On Tue, 6 Dec 2022 19:46:25 GMT, Ashutosh Mehra <duke at openjdk.org> wrote:

> > We should instead just use MAP_SHARED flag for ro sections.
> 
> To clarify, if the ro sections don't require relocation, use MAP_SHARED, else use MAP_PRIVATE.

I am not sure why we use MAP_PRIVATE + PROT_READ for CDS. Maybe it just happened to work so we end up doing it that way. I filed https://bugs.openjdk.org/browse/JDK-8298216 , quoting your suggestions from the previous comments.

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

PR: https://git.openjdk.org/jdk/pull/11401


More information about the hotspot-runtime-dev mailing list