< prev index next >
test/runtime/Unsafe/GetPutAddress.java
Print this page
*** 29,45 ****
* java.management
* @run main GetPutAddress
*/
import jdk.test.lib.Platform;
- import jdk.test.lib.unsafe.UnsafeHelper;
import jdk.internal.misc.Unsafe;
import static jdk.test.lib.Asserts.*;
public class GetPutAddress {
public static void main(String args[]) throws Exception {
! Unsafe unsafe = UnsafeHelper.getUnsafe();
int addressSize = unsafe.addressSize();
// Ensure the size returned from Unsafe.addressSize is correct
assertEquals(unsafe.addressSize(), Platform.is32bit() ? 4 : 8);
// Write the address, read it back and make sure it's the same value
--- 29,44 ----
* java.management
* @run main GetPutAddress
*/
import jdk.test.lib.Platform;
import jdk.internal.misc.Unsafe;
import static jdk.test.lib.Asserts.*;
public class GetPutAddress {
public static void main(String args[]) throws Exception {
! Unsafe unsafe = Unsafe.getUnsafe();
int addressSize = unsafe.addressSize();
// Ensure the size returned from Unsafe.addressSize is correct
assertEquals(unsafe.addressSize(), Platform.is32bit() ? 4 : 8);
// Write the address, read it back and make sure it's the same value
< prev index next >