8350701: [JMH] test foreign.AllocFromSliceTest failed with Exception for size>1024

Reviewed-by: pminborg
This commit is contained in:
Vladimir Ivanov 2025-02-27 20:35:58 +00:00 committed by Derek White
parent 3ae80bfb60
commit f1398ecbe4

View File

@ -55,10 +55,10 @@ public class AllocFromSliceTest extends CLayouts {
@Setup
public void setup() {
arr = new byte[1024];
arr = new byte[size * 2];
Random random = new Random(0);
random.nextBytes(arr);
start = random.nextInt(1024 - size);
start = random.nextInt(size);
}
@Benchmark