Author: nextgens
Date: 2008-08-25 21:36:32 +0000 (Mon, 25 Aug 2008)
New Revision: 22153
Modified:
trunk/freenet/src/freenet/support/io/TempBucketFactory.java
Log:
Even better this way
Modified: trunk/freenet/src/freenet/support/io/TempBucketFactory.java
===================================================================
--- trunk/freenet/src/freenet/support/io/TempBucketFactory.java 2008-08-25
21:35:19 UTC (rev 22152)
+++ trunk/freenet/src/freenet/support/io/TempBucketFactory.java 2008-08-25
21:36:32 UTC (rev 22153)
@@ -129,7 +129,7 @@
if(futureSize > maxRAMBucketSize *
RAMBUCKET_CONVERSION_FACTOR) {
isOversized = true;
shouldMigrate = true;
- } else if (futureSize + bytesInUse >
maxRamUsed)
+ } else if ((futureSize - currentSize) +
bytesInUse > maxRamUsed)
shouldMigrate = true;
if(shouldMigrate) {