For example, see the test like this:
@JCStressTest
@State
public class ByteTest {
volatile byte[] arr;
@Actor
public void actor1() {
arr = new byte[2 * 1024 * 1024];
}
...
}
Each instance of this @State would take at least 2 Mb of space. And here is where it gets tricky: the harness itself would try to autobalance the stride size to improve test performance. Among other things, this will affect the size of the @State object array:
Solo stride size will be autobalanced within [10, 10000] elements
Which means, with 10K @State objects, 2Mb each, we have to have 20 Gb on heap to store them all. This blows 32-bit address space, if autobalancing trips over the 2K limit. We need to figure the way out for special tests like these.
@JCStressTest
@State
public class ByteTest {
volatile byte[] arr;
@Actor
public void actor1() {
arr = new byte[2 * 1024 * 1024];
}
...
}
Each instance of this @State would take at least 2 Mb of space. And here is where it gets tricky: the harness itself would try to autobalance the stride size to improve test performance. Among other things, this will affect the size of the @State object array:
Solo stride size will be autobalanced within [10, 10000] elements
Which means, with 10K @State objects, 2Mb each, we have to have 20 Gb on heap to store them all. This blows 32-bit address space, if autobalancing trips over the 2K limit. We need to figure the way out for special tests like these.
- blocks
-
JDK-8166137 org/openjdk/jcstress/tests/.../LongTest DoubleTest FloatTest IntTest BooleanTest fail with java.lang.OutOfMemoryError: Java heap space
-
- Closed
-
- duplicates
-
JDK-8166137 org/openjdk/jcstress/tests/.../LongTest DoubleTest FloatTest IntTest BooleanTest fail with java.lang.OutOfMemoryError: Java heap space
-
- Closed
-
- relates to
-
JDK-8166137 org/openjdk/jcstress/tests/.../LongTest DoubleTest FloatTest IntTest BooleanTest fail with java.lang.OutOfMemoryError: Java heap space
-
- Closed
-