提交 d93f54ca 编写于 作者: W weijun

8130297: com/sun/crypto/provider/KeyFactory/TestProviderLeak.java still failing after JDK-8076040

Reviewed-by: darcy
上级 d64c9a94
...@@ -67,14 +67,16 @@ public class TestProviderLeak { ...@@ -67,14 +67,16 @@ public class TestProviderLeak {
data.add(megaByte); data.add(megaByte);
} catch (OutOfMemoryError e) { } catch (OutOfMemoryError e) {
megaByte = null; // Free memory ASAP megaByte = null; // Free memory ASAP
System.out.println("OOME is thrown when allocating "
+ data.size() + "MB memory."); int size = data.size();
for (int j = 0; j < RESERVATION && !data.isEmpty(); j++) { for (int j = 0; j < RESERVATION && !data.isEmpty(); j++) {
data.removeLast(); data.removeLast();
} }
System.gc(); System.gc();
hasException = true; hasException = true;
System.out.println("OOME is thrown when allocating "
+ size + "MB memory.");
} }
} }
dumpMemoryStats("After memory allocation"); dumpMemoryStats("After memory allocation");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册