hotspot/test/runtime/Unsafe/GetPutAddress.java
changeset 41092 c388d897472d
parent 40855 3c4c913195e3
equal deleted inserted replaced
41091:de3789bb384e 41092:c388d897472d
    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.unsafe.UnsafeHelper;
       
    35 import jdk.internal.misc.Unsafe;
    34 import jdk.internal.misc.Unsafe;
    36 import static jdk.test.lib.Asserts.*;
    35 import static jdk.test.lib.Asserts.*;
    37 
    36 
    38 public class GetPutAddress {
    37 public class GetPutAddress {
    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         int addressSize = unsafe.addressSize();
    40         int addressSize = unsafe.addressSize();
    42         // Ensure the size returned from Unsafe.addressSize is correct
    41         // Ensure the size returned from Unsafe.addressSize is correct
    43         assertEquals(unsafe.addressSize(), Platform.is32bit() ? 4 : 8);
    42         assertEquals(unsafe.addressSize(), Platform.is32bit() ? 4 : 8);
    44 
    43 
    45         // Write the address, read it back and make sure it's the same value
    44         // Write the address, read it back and make sure it's the same value