summaryrefslogtreecommitdiffstats
path: root/test/080-oom-throw
diff options
context:
space:
mode:
Diffstat (limited to 'test/080-oom-throw')
-rw-r--r--test/080-oom-throw/src/Main.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/080-oom-throw/src/Main.java b/test/080-oom-throw/src/Main.java
index 035690f..c93f8bb 100644
--- a/test/080-oom-throw/src/Main.java
+++ b/test/080-oom-throw/src/Main.java
@@ -31,6 +31,7 @@ public class Main {
static class InstanceMemEater {
static boolean sawOome;
+ static InstanceMemEater hook;
InstanceMemEater next;
double d1, d2, d3, d4, d5, d6, d7, d8; // Bloat this object so we fill the heap faster.
@@ -45,6 +46,7 @@ public class Main {
}
static void confuseCompilerOptimization(InstanceMemEater instance) {
+ hook = instance;
}
}
@@ -61,6 +63,7 @@ public class Main {
lastMemEater = lastMemEater.next;
} while (lastMemEater != null);
memEater.confuseCompilerOptimization(memEater);
+ InstanceMemEater.hook = null;
return InstanceMemEater.sawOome;
}