Skip to content


This Oracle HotSpot option affects the alignment of direct byte buffer allocation and is implemented by the Eclipse OpenJ9™ VM for compatibility.


Setting Effect Default
-XX:+PageAlignDirectMemory Enable
-XX:-PageAlignDirectMemory Disable yes

As discussed in the Oracle documentation, before Java™ SE 7, direct buffers that were allocated using java.nio.ByteBuffer.allocateDirect(int) were aligned on a page boundary. This behavior changed in Java SE 7 and the -XX:+PageAlignDirectMemory option is provided to revert to the previous behavior.

For more information about the changes, see RFE 4837564, which was introduced in the Java SE 7 release notes.