Author: orbiter
Date: 2008-02-04 11:33:45 +0100 (Mon, 04 Feb 2008)
New Revision: 4441
Modified:
trunk/source/de/anomic/kelondro/kelondroEcoTable.java
Log:
fix for false RAM table activation in EcoTables
Modified: trunk/source/de/anomic/kelondro/kelondroEcoTable.java
===================================================================
--- trunk/source/de/anomic/kelondro/kelondroEcoTable.java 2008-02-03
22:14:22 UTC (rev 4440)
+++ trunk/source/de/anomic/kelondro/kelondroEcoTable.java 2008-02-04
10:33:45 UTC (rev 4441)
@@ -97,13 +97,13 @@
// initialize index and copy table
int records = (int) Math.max(file.size(), initialSpace);
- long neededRAM4table = 200 * 1024 * 1024 + records *
(rowdef.objectsize + 4) * 3 / 2;
+ long neededRAM4table = records * (rowdef.objectsize + 4) * 3 / 2;
table = ((neededRAM4table < maxarraylength) &&
((useTailCache == tailCacheForceUsage) ||
- ((useTailCache == tailCacheUsageAuto) &&
(serverMemory.request(neededRAM4table, false))))) ?
+ ((useTailCache == tailCacheUsageAuto) &&
(serverMemory.request(neededRAM4table + 200 * 1024 * 1024, false))))) ?
new kelondroRowSet(taildef, records) : null;
System.out.println("*** DEBUG " + tablefile + ": available RAM: "
+ (serverMemory.available() / 1024 / 1024) + "MB, allocating space for " +
records + " entries");
- long neededRAM4index = 200 * 1024 * 1024 + records *
(rowdef.primaryKeyLength + 4) * 3 / 2;
+ long neededRAM4index = 2 * 1024 * 1024 + records *
(rowdef.primaryKeyLength + 4) * 3 / 2;
if (!serverMemory.request(neededRAM4index, false)) {
// 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
_______________________________________________
YaCy-svn mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/yacy-svn