Proposal for adding O_DIRECT support into JDK 9

Alan Bateman Alan.Bateman at oracle.com
Mon Oct 17 14:59:03 UTC 2016


On 12/10/2016 17:41, Lu, Yingqi wrote:

> :
>
> You are correct about the "extra copy" with DirectIO. Will it be acceptable if we add a function "Util.getAlignedTemporaryDirectBuffer" and use that for the DirectIO operation? In this case, I think we should be able to avoid the additional copy?
>
Yes, that should work but it still lacks a way for the user to get an 
aligned buffer and so you will always be copying in and out of an 
aligned buffer. The other thing is the sizing of the I/O operation where 
I think you will also need a way to expose the multiple (or block size) 
to the user.

-Alan.


More information about the nio-dev mailing list