- new limit to use the table copy (instead of flag): 400MB available. If
less is available, then a copy is never used. If more is available, then
it can be used if there is a remaining space of at least 200MB
- flush caches more often: flush the Digest cache
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");
// 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
// for the index
Log.logSevere("TABLE",tablefile.getName()+": not enough RAM ("+(MemoryControl.available()/1024/1024)+"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/1024/1024)+"MB)");
this.table=null;System.gc();
Log.logSevere("TABLE",tablefile.getName()+": RAM after releasing the table: "+(MemoryControl.available()/1024/1024)+"MB");
Log.logSevere("TABLE",tablefile.getName()+": RAM after releasing the table: "+(MemoryControl.available()/1024L/1024L)+"MB");