According to Java SE 7 Features and Enhancements you can add the "-XX:+PageAlignDirectMemory" option to the java command line to force directly-allocated ByteBuffers to be page aligned.
When I try and use the option, however, I get an error: Unrecognized VM option 'PageAlignDirectMemory'
This is using JDK version 1.7.0_25 on 64-bit Linux.
Anyone else get the same problem?
If you search for the word "align" in this page: http://www.oracle.com/technetwork/java/javase/jdk7-relnotes-418459.html you'll find it.
It is also mentioned here: http://download.java.net/jdk8/docs/technotes/guides/io/enhancements.html#jdk7