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

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

Loading…
Cancel
Save