@ -132,13 +132,13 @@ public class Table implements Index, Iterable<Row.Entry> {
}catch(Throwablee){
}catch(Throwablee){
this.table=null;
this.table=null;
}
}
Log.logInfo("TABLE","initialization of "+tablefile.getName()+". table copy: "+((this.table==null)?"no":"yes")+", available RAM: "+(MemoryControl.available()/1024/1024)+"MB, needed: "+(neededRAM4table/1024/1024+200)+"MB, allocating space for "+records+" entries");
Log.logInfo("TABLE","initialization of "+tablefile.getName()+". table copy: "+((this.table==null)?"no":"yes")+", available RAM: "+(MemoryControl.available()/1024L/1024L)+"MB, needed: "+(neededRAM4table/1024L/1024L)+"MB, allocating space for "+records+" entries");
// despite calculations seemed to show that there is enough memory for the table AND the index
// despite calculations seemed to show that there is enough memory for the table AND the index
// there is now not enough memory left for the index. So delete the table again to free the memory
// there is now not enough memory left for the index. So delete the table again to free the memory
// for the index
// for the index
Log.logSevere("TABLE",tablefile.getName()+": not enough RAM ("+(MemoryControl.available()/1024L/1024L)+"MB) left for index, deleting allocated table space to enable index space allocation (needed: "+(neededRAM4index/1024/1024)+"MB)");
Log.logSevere("TABLE",tablefile.getName()+": not enough RAM ("+(MemoryControl.available()/1024L/1024L)+"MB) left for index, deleting allocated table space to enable index space allocation (needed: "+(neededRAM4index/1024L/1024L)+"MB)");
this.table=null;System.gc();
this.table=null;System.gc();
Log.logSevere("TABLE",tablefile.getName()+": RAM after releasing the table: "+(MemoryControl.available()/1024L/1024L)+"MB");
Log.logSevere("TABLE",tablefile.getName()+": RAM after releasing the table: "+(MemoryControl.available()/1024L/1024L)+"MB");
}
}
@ -714,6 +714,7 @@ public class Table implements Index, Iterable<Row.Entry> {