The latest JEP and draft implementation now address the 3 outstanding issues:
1) 2-arg force method now uses integer start offset and length force(int from, int length) 2) length is checked against buffer limit rather than capacity 3) start position and length checks are implemented using Objects.checkFromIndexSize. In consequence, force(int,int) now throws IOOBE. I updated the JEP and javadoc to record this. JEP: http://openjdk.java.net/jeps/8207851 webrev: http://cr.openjdk.java.net/~adinn/pmem/webrev.06 I also made one small, additional correction to the implementation. When force(int,int) is called with a non-SYNC buffer it is expected to redirect to force0. The address arg passed in this call was being computed by adding the supplied offset to buffer start address. However, the underlying implementation of force0 calls msync which requires a page-aligned address. The latest version rounds down the computed address to a page boundary. It also increments length by the amount thus subtracted, ensuring all the bytes in the requested range are written back. regards, Andrew Dinn ----------- Senior Principal Software Engineer Red Hat UK Ltd Registered in England and Wales under Company Registration No. 03798903 Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander