7168505: (bf) MappedByteBuffer.load does not load buffer's content into memory
Alan Bateman
Alan.Bateman at oracle.com
Mon May 14 07:31:07 PDT 2012
This one is somewhat assuming. MappedByteBuffer.load touches each page
in the mapping into order to load the buffer into memory. Unfortunately
it gets compiled into essentially a no-op server compiler (aside from
the madvise). Someone ran into this on the Mac porting list [1]. The
reason it isn't observed with JDK6 and older is because the load method
is implemented in native code (we moved it into into Java as part of
changes to sort out some alignment issues and also to address the issue
of the file being truncated). The webrev with the proposed changes is here:
http://cr.openjdk.java.net/~alanb/7168505/webrev/
There are other ways of course.
-Alan
[1]
http://mail.openjdk.java.net/pipermail/macosx-port-dev/2012-May/004143.html
More information about the nio-dev
mailing list