Skip to content

Commit f1398ec

Browse files
Vladimir IvanovDerek White
authored andcommitted
8350701: [JMH] test foreign.AllocFromSliceTest failed with Exception for size>1024
Reviewed-by: pminborg
1 parent 3ae80bf commit f1398ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/micro/org/openjdk/bench/java/lang/foreign/AllocFromSliceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ public class AllocFromSliceTest extends CLayouts {
5555

5656
@Setup
5757
public void setup() {
58-
arr = new byte[1024];
58+
arr = new byte[size * 2];
5959
Random random = new Random(0);
6060
random.nextBytes(arr);
61-
start = random.nextInt(1024 - size);
61+
start = random.nextInt(size);
6262
}
6363

6464
@Benchmark

0 commit comments

Comments
 (0)