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

Ioi Lam iklam at openjdk.org
Tue Dec 6 19:21:12 UTC 2022


On Tue, 6 Dec 2022 17:31:49 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> We map CDS with MAP_PRIVATE, either ro or rw. I thought we map with MAP_SHARED, and then just don't write to it.

That's correct. The `MetaspaceShared::ro` region is usually mmapped with `flags=MAP_PRIVATE` with `prot=PROT_READ`

https://github.com/openjdk/jdk/blob/ea83cb960d07ffa9384aad6a1e2a0233e3ebbdd1/src/hotspot/os/linux/os_linux.cpp#L4930-L4940

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

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


More information about the hotspot-runtime-dev mailing list