< prev index next >
test/runtime/Unsafe/SetMemory.java
Print this page
@@ -28,17 +28,16 @@
* @modules java.base/jdk.internal.misc
* java.management
* @run main SetMemory
*/
-import jdk.test.lib.unsafe.UnsafeHelper;
import jdk.internal.misc.Unsafe;
import static jdk.test.lib.Asserts.*;
public class SetMemory {
public static void main(String args[]) throws Exception {
- Unsafe unsafe = UnsafeHelper.getUnsafe();
+ Unsafe unsafe = Unsafe.getUnsafe();
long address = unsafe.allocateMemory(1);
assertNotEquals(address, 0L);
unsafe.setMemory(address, 1, (byte)17);
assertEquals((byte)17, unsafe.getByte(address));
unsafe.freeMemory(address);
< prev index next >