Suggested fix for JDK-4724038 (Add unmap method to MappedByteBuffer)

Vitaly Davidovich vitalyd at
Thu Sep 10 14:26:19 UTC 2015

Yes, so what happens when that guard page is accessed by a thread after
safepoint? The safepoint does nothing, as you said, it just ensures no
thread is actively working against the mapping but it may still be

sent from my phone
On Sep 10, 2015 10:22 AM, "Andrew Haley" <aph at> wrote:

> On 09/10/2015 03:13 PM, Vitaly Davidovich wrote:
> > So what happens after safepoint is done and thread accesses the
> > mapping (it would need protection NONE, not just write)? JVM is then
> > going to trap the signal and convert to an exception?
> One of us is missing something, and I don't think it's me.  :-)
> There is a protection page (just one page) associated with every
> mapping.  Every access to a mapping is guarded by that protection
> page.  The protection page is mapped for as long as the
> MappedByteBuffer is alive.
> Andrew.

More information about the core-libs-dev mailing list