We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afda078 commit 28c2c3fCopy full SHA for 28c2c3f
jdk/test/jdk/internal/platform/docker/MetricsMemoryTester.java
@@ -75,12 +75,12 @@ private static void testMemoryFailCount() {
75
} else {
76
long count = Metrics.systemMetrics().getMemoryFailCount();
77
78
- // Allocate 512M of data
79
- byte[][] bytes = new byte[64][];
+ // Allocate 512M of data in 1M chunks per iteration
+ byte[][] bytes = new byte[64 * 8][];
80
boolean atLeastOneAllocationWorked = false;
81
- for (int i = 0; i < 64; i++) {
+ for (int i = 0; i < 64 * 8; i++) {
82
try {
83
- bytes[i] = new byte[8 * 1024 * 1024];
+ bytes[i] = new byte[1024 * 1024];
84
atLeastOneAllocationWorked = true;
85
// Break out as soon as we see an increase in failcount
86
// to avoid getting killed by the OOM killer.
0 commit comments