set the java flags more like java launcher on pc

This commit is contained in:
LegacyGamerHD 2020-10-20 13:15:53 +02:00 committed by GitHub
parent 47d3f59263
commit d9a481af60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,12 +36,12 @@ public class LauncherPreferences
"-Xms" + (androidHeap > 800 ? 800 : androidHeap) + "m " + "-Xms" + (androidHeap > 800 ? 800 : androidHeap) + "m " +
// (32bit) More than 800mb may make JVM not allocateable and crash // (32bit) More than 800mb may make JVM not allocateable and crash
"-Xmx" + (doubleAndroidHeap > 800 ? 800 : doubleAndroidHeap) + "m " + "-Xmx" + (doubleAndroidHeap > 800 ? 800 : doubleAndroidHeap) + "m " +
"-XX:+UseG1GC " +
"-XX:+UnlockExperimentalVMOptions " + "-XX:+UnlockExperimentalVMOptions " +
"-XX:+UseG1GC " +
"-XX:G1NewSizePercent=20 " + "-XX:G1NewSizePercent=20 " +
"-XX:G1ReservePercent=20 " + "-XX:G1ReservePercent=20 " +
"-XX:MaxGCPauseMillis=50 " + "-XX:MaxGCPauseMillis=50 " +
"-XX:G1HeapRegionSize=16M"; "-XX:G1HeapRegionSize=32M";
PREF_CUSTOM_JAVA_ARGS = DEFAULT_JAVA_ARGS; PREF_CUSTOM_JAVA_ARGS = DEFAULT_JAVA_ARGS;
DEFAULT_PREF.edit().putString("javaArgs", DEFAULT_JAVA_ARGS).commit(); DEFAULT_PREF.edit().putString("javaArgs", DEFAULT_JAVA_ARGS).commit();