--- old/src/share/classes/sun/misc/Unsafe.java 2013-03-20 13:55:29.692552488 +0000 +++ new/src/share/classes/sun/misc/Unsafe.java 2013-03-20 13:55:29.492549273 +0000 @@ -504,9 +504,33 @@ /** * Sets all bytes in a given block of memory to a copy of another * block. + * + *

This method determines each block's base address by means of two parameters, + * and so it provides (in effect) a double-register addressing mode, + * as discussed in {@link #getInt(Object,long)}. When the object reference is null, + * the offset supplies an absolute base address. + * + *

The transfers are in coherent (atomic) units of a size determined + * by the address and length parameters. If the effective addresses and + * length are all even modulo 8, the transfer takes place in 'long' units. + * If the effective addresses and length are (resp.) even modulo 4 or 2, + * the transfer takes place in units of 'int' or 'short'. + * + * @since 1.7 */ - public native void copyMemory(long srcAddress, long destAddress, + public native void copyMemory(Object srcBase, long srcOffset, + Object destBase, long destOffset, long bytes); + /** + * Sets all bytes in a given block of memory to a copy of another + * block. This provides a single-register addressing mode, + * as discussed in {@link #getInt(Object,long)}. + * + * Equivalent to copyMemory(null, srcAddress, null, destAddress, bytes). + */ + public void copyMemory(long srcAddress, long destAddress, long bytes) { + copyMemory(null, srcAddress, null, destAddress, bytes); + } /** * Disposes of a block of native memory, as obtained from {@link