limit -Xmx setting to 1999m on win32. bigger values would never work.

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5513 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
lotus 16 years ago
parent 5078e837ac
commit 4ef6b15eb8

@ -37,6 +37,7 @@ import de.anomic.server.serverCore;
import de.anomic.server.serverFileUtils;
import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
import de.anomic.server.serverSystem;
import de.anomic.server.serverThread;
import de.anomic.tools.yFormatter;
@ -68,9 +69,11 @@ public class PerformanceQueues_p {
if (post.containsKey("Xmx")) {
int xmx = 120; // default maximum heap size
try { xmx = Integer.valueOf(post.get("Xmx", "120")).intValue(); } catch (final NumberFormatException e){}
sb.setConfig("javastart_Xmx", "Xmx" + xmx + "m");
sb.setConfig("javastart_Xms", "Xms" + xmx + "m");
prop.put("setStartupCommit", "1");
if (!(serverSystem.isWin32 && xmx >= 2000)){
sb.setConfig("javastart_Xmx", "Xmx" + xmx + "m");
sb.setConfig("javastart_Xms", "Xms" + xmx + "m");
prop.put("setStartupCommit", "1");
}
}
}
final Map<String, String> defaultSettings = ((post == null) || (!(post.containsKey("submitdefault")))) ? null : serverFileUtils.loadHashMap(defaultSettingsFile);

@ -51,6 +51,7 @@ public final class serverSystem {
public static final boolean isUnixFS;
public static final boolean canExecUnix;
public static final boolean isWindows;
public static final boolean isWin32;
// calculated system constants
public static int maxPathLength = 65535;
@ -83,6 +84,7 @@ public final class serverSystem {
isUnixFS = ((systemOS == systemMacOSX) || (systemOS == systemUnix));
canExecUnix = ((isUnixFS) || (!((systemOS == systemMacOSC) || (systemOS == systemWindows))));
isWindows = (systemOS == systemWindows);
isWin32 = (isWindows && System.getProperty("os.arch", "").contains("x86"));
// set up the MRJ Methods through reflection
if (isMacArchitecture) try {

Loading…
Cancel
Save