forked from I2P_Developers/i2p.i2p
Utils: Double IP lookup cache size (ticket #1700)
This commit is contained in:
@@ -231,10 +231,10 @@ public abstract class Addresses {
|
|||||||
I2PAppContext ctx = I2PAppContext.getCurrentContext();
|
I2PAppContext ctx = I2PAppContext.getCurrentContext();
|
||||||
if (ctx != null && ctx.isRouterContext()) {
|
if (ctx != null && ctx.isRouterContext()) {
|
||||||
long maxMemory = SystemVersion.getMaxMemory();
|
long maxMemory = SystemVersion.getMaxMemory();
|
||||||
long min = 128;
|
long min = 256;
|
||||||
long max = 4096;
|
long max = 4096;
|
||||||
// 512 nominal for 128 MB
|
// 1024 nominal for 128 MB
|
||||||
size = (int) Math.max(min, Math.min(max, 1 + (maxMemory / (256*1024))));
|
size = (int) Math.max(min, Math.min(max, 1 + (maxMemory / (128*1024))));
|
||||||
} else {
|
} else {
|
||||||
size = 32;
|
size = 32;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user