equal
deleted
inserted
replaced
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 |