hotspot/test/runtime/Unsafe/GetPutAddress.java
changeset 40855 3c4c913195e3
parent 40631 ed82623d7831
child 41092 c388d897472d
equal deleted inserted replaced
40854:f20df9375ac9 40855:3c4c913195e3
    29  *          java.management
    29  *          java.management
    30  * @run main GetPutAddress
    30  * @run main GetPutAddress
    31  */
    31  */
    32 
    32 
    33 import jdk.test.lib.Platform;
    33 import jdk.test.lib.Platform;
    34 import jdk.test.lib.Utils;
    34 import jdk.test.lib.unsafe.UnsafeHelper;
    35 import jdk.internal.misc.Unsafe;
    35 import jdk.internal.misc.Unsafe;
    36 import static jdk.test.lib.Asserts.*;
    36 import static jdk.test.lib.Asserts.*;
    37 
    37 
    38 public class GetPutAddress {
    38 public class GetPutAddress {
    39     public static void main(String args[]) throws Exception {
    39     public static void main(String args[]) throws Exception {
    40         Unsafe unsafe = Utils.getUnsafe();
    40         Unsafe unsafe = UnsafeHelper.getUnsafe();
    41         int addressSize = unsafe.addressSize();
    41         int addressSize = unsafe.addressSize();
    42         // Ensure the size returned from Unsafe.addressSize is correct
    42         // Ensure the size returned from Unsafe.addressSize is correct
    43         assertEquals(unsafe.addressSize(), Platform.is32bit() ? 4 : 8);
    43         assertEquals(unsafe.addressSize(), Platform.is32bit() ? 4 : 8);
    44 
    44 
    45         // Write the address, read it back and make sure it's the same value
    45         // Write the address, read it back and make sure it's the same value