Skip to content

Commit

Permalink
try to fix memory allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
SolDev69 committed Mar 19, 2024
1 parent 1ccd922 commit 1f35c94
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,16 @@ public static void launchJavaVM(final AppCompatActivity activity, final Runtime
purgeArg(userArgs, "-XX:+UseLargePagesInMetaspace");
purgeArg(userArgs, "-XX:+UseLargePages");

if(LOCAL_RENDERER != null) userArgs.add("-Dorg.lwjgl.opengl.libname=" + graphicsLib);
userArgs.addAll(JVMArgs);
//Add automatically generated args
if (!isUsingCustomMem(userArgs))
{
userArgs.add("-Xms" + LauncherPreferences.PREF_RAM_ALLOCATION + "M");
userArgs.add("-Xmx" + LauncherPreferences.PREF_RAM_ALLOCATION + "M");
}

if(LOCAL_RENDERER != null) userArgs.add("-Dorg.lwjgl.opengl.libname=" + graphicsLib);
userArgs.addAll(JVMArgs);

activity.runOnUiThread(() -> Toast.makeText(activity, activity.getString(R.string.autoram_info_msg,getAllocatedMemory(userArgs)), Toast.LENGTH_SHORT).show());
System.out.println(JVMArgs);

Expand Down

0 comments on commit 1f35c94

Please sign in to comment.