hotspot/test/runtime/Unsafe/CopyMemory.java
changeset 41092 c388d897472d
parent 40855 3c4c913195e3
equal deleted inserted replaced
41091:de3789bb384e 41092:c388d897472d
    28  * @modules java.base/jdk.internal.misc
    28  * @modules java.base/jdk.internal.misc
    29  *          java.management
    29  *          java.management
    30  * @run main CopyMemory
    30  * @run main CopyMemory
    31  */
    31  */
    32 
    32 
    33 import jdk.test.lib.unsafe.UnsafeHelper;
       
    34 import jdk.internal.misc.Unsafe;
    33 import jdk.internal.misc.Unsafe;
    35 import static jdk.test.lib.Asserts.*;
    34 import static jdk.test.lib.Asserts.*;
    36 
    35 
    37 public class CopyMemory {
    36 public class CopyMemory {
    38     final static int LENGTH = 8;
    37     final static int LENGTH = 8;
    39     public static void main(String args[]) throws Exception {
    38     public static void main(String args[]) throws Exception {
    40         Unsafe unsafe = UnsafeHelper.getUnsafe();
    39         Unsafe unsafe = Unsafe.getUnsafe();
    41         long src = unsafe.allocateMemory(LENGTH);
    40         long src = unsafe.allocateMemory(LENGTH);
    42         long dst = unsafe.allocateMemory(LENGTH);
    41         long dst = unsafe.allocateMemory(LENGTH);
    43         assertNotEquals(src, 0L);
    42         assertNotEquals(src, 0L);
    44         assertNotEquals(dst, 0L);
    43         assertNotEquals(dst, 0L);
    45 
    44