test/compiler/unsafe/UnsafeRaw.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/test/compiler/unsafe/UnsafeRaw.java Tue Oct 28 19:58:59 2014
--- new/test/compiler/unsafe/UnsafeRaw.java Tue Oct 28 19:58:59 2014
*** 78,88 ****
--- 78,88 ----
sun.misc.Unsafe unsafe = Utils.getUnsafe();
final int array_size = 128;
final int element_size = 4;
final int magic = 0x12345678;
! Random rnd = new Random();
! Random rnd = Utils.getRandomInstance();
long array = unsafe.allocateMemory(array_size * element_size); // 128 ints
long addr = array + array_size * element_size / 2; // something in the middle to work with
unsafe.putInt(addr, magic);
for (int j = 0; j < 100000; j++) {
test/compiler/unsafe/UnsafeRaw.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File