提交 6b871e87 authored 作者: Thomas Mueller's avatar Thomas Mueller

avoid out of memory

上级 07d12daf
......@@ -52,6 +52,8 @@ public class Cache2Q implements Cache {
headMain.next = headMain.previous = headMain;
headIn.next = headIn.previous = headIn;
headOut.next = headOut.previous = headOut;
// first set to null - avoiding out of memory
values = null;
values = new CacheObject[len];
sizeIn = sizeOut = sizeMain = 0;
recordCount = 0;
......
......@@ -39,6 +39,8 @@ public class CacheLRU implements Cache {
public void clear() {
head.next = head.previous = head;
// first set to null - avoiding out of memory
values = null;
values = new CacheObject[len];
recordCount = 0;
sizeMemory = 0;
......
......@@ -278,9 +278,11 @@ java org.h2.test.TestAll timer
test.printSystem();
System.setProperty("h2.maxMemoryRowsDistinct", "128");
System.setProperty("h2.check2", "true");
/*
truncate in-memory file system after each test
split files (1 GB max size)
Windows service Wrapper not starting because of incorrect classpath
......
......@@ -217,7 +217,9 @@ public abstract class TestBase {
url += ";TRACE_LEVEL_SYSTEM_OUT=2";
}
if (config.traceLevelFile > 0 && admin) {
url += ";TRACE_LEVEL_FILE=" + config.traceLevelFile;
if (url.indexOf("TRACE_LEVEL_FILE=") < 0) {
url += ";TRACE_LEVEL_FILE=" + config.traceLevelFile;
}
}
if (config.throttle > 0) {
url += ";THROTTLE=" + config.throttle;
......
......@@ -42,7 +42,7 @@ public class TestPowerOff extends TestBase {
} else {
dir = "memFS:";
}
url = dir + "/" + dbName + ";file_lock=no";
url = dir + "/" + dbName + ";FILE_LOCK=NO;TRACE_LEVEL_FILE=0";
testSummaryCrash();
testCrash();
testShutdown();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论