Utils: Double IP lookup cache size (ticket #1700)

This commit is contained in:
zzz
2015-11-01 19:31:22 +00:00
parent 787921aa89
commit a3a092a454

View File

@ -231,10 +231,10 @@ public abstract class Addresses {
I2PAppContext ctx = I2PAppContext.getCurrentContext();
if (ctx != null && ctx.isRouterContext()) {
long maxMemory = SystemVersion.getMaxMemory();
long min = 128;
long min = 256;
long max = 4096;
// 512 nominal for 128 MB
size = (int) Math.max(min, Math.min(max, 1 + (maxMemory / (256*1024))));
// 1024 nominal for 128 MB
size = (int) Math.max(min, Math.min(max, 1 + (maxMemory / (128*1024))));
} else {
size = 32;
}