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

David M. Lloyd david.lloyd at
Tue Sep 8 18:49:20 UTC 2015

On 09/08/2015 01:37 PM, Andrew Haley wrote:
> On 09/08/2015 06:54 PM, David M. Lloyd wrote:
>> I think the only questionable platform at this point is Windows (to me
>> at least, given that I do not have much experience on it).
> That's right, and it's Windows which has the worst problem: on UNIX
> you can delete a file which is mapped, on Windows AFAIK you can't.  I
> think that MR is referring to Windows when he talks about race
> conditions.

Possibly, but again, if Windows can somehow allow pages to be remapped 
without first unmapping them the way other OSes can, then the file lock 
issue is no longer an issue, which is the entire point of the approach. 
  Researching Windows' behavior seems to be the key; I haven't been able 
to discover anything definitive online though, and I do not have 
immediate access to any Windows-based machines for testing, so I 
couldn't really guess beyond that.


More information about the core-libs-dev mailing list