Unverified 提交 bcd56eb9 authored 作者: Noel Grandin's avatar Noel Grandin 提交者: GitHub

Merge pull request #838 from andreitokar/excessive_gc_calls

Excessive calls to Runtime.getRumtime().gc() cause OOM for no reason
...@@ -395,7 +395,9 @@ public abstract class TestBase { ...@@ -395,7 +395,9 @@ public abstract class TestBase {
*/ */
public void printTimeMemory(String s, long time) { public void printTimeMemory(String s, long time) {
if (config.big) { if (config.big) {
println(getMemoryUsed() + " MB: " + s + " ms: " + time); Runtime rt = Runtime.getRuntime();
long memNow = rt.totalMemory() - rt.freeMemory();
println(memNow / 1024 / 1024 + " MB: " + s + " ms: " + time);
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论