diff options
Diffstat (limited to 'test/080-oom-throw/src')
-rw-r--r-- | test/080-oom-throw/src/Main.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/080-oom-throw/src/Main.java b/test/080-oom-throw/src/Main.java index 3d75f3d..052feb6 100644 --- a/test/080-oom-throw/src/Main.java +++ b/test/080-oom-throw/src/Main.java @@ -56,6 +56,8 @@ public class Main { int count = ArrayMemEater.blowup(holder, size); ArrayMemEater.confuseCompilerOptimization(holder); + // Ensure there is some reclaimable memory for println. + holder = null; if (count < size) { System.out.println("Array allocation failed"); } @@ -69,6 +71,8 @@ public class Main { lastMemEater = lastMemEater.next; } while (lastMemEater != null); memEater.confuseCompilerOptimization(memEater); + // Ensure there is some reclaimable memory for println. + memEater = null; System.out.println("Instance allocation failed"); } |