fix: replace fixed memory limit with -XX:MaxRAMPercentage=70.0 (#1437)

This commit is contained in:
Skylot
2022-04-05 19:47:46 +01:00
parent 994973ac01
commit f0a8ef81d3
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ dependencies {
application { application {
applicationName = 'jadx' applicationName = 'jadx'
mainClass.set('jadx.cli.JadxCLI') mainClass.set('jadx.cli.JadxCLI')
applicationDefaultJvmArgs = ['-Xms128M', '-Xmx4g', '-XX:+UseG1GC'] applicationDefaultJvmArgs = ['-Xms128M', '-XX:MaxRAMPercentage=70.0', '-XX:+UseG1GC']
} }
applicationDistribution.with { applicationDistribution.with {
+3 -2
View File
@@ -34,6 +34,9 @@ dependencies {
application { application {
applicationName = 'jadx-gui' applicationName = 'jadx-gui'
mainClass.set('jadx.gui.JadxGUI') mainClass.set('jadx.gui.JadxGUI')
// The option -XX:+UseG1GC is only relevant for Java 8. Starting with Java 9 G1GC is already the default GC
applicationDefaultJvmArgs = ['-Xms128M', '-XX:MaxRAMPercentage=70.0', '-XX:+UseG1GC',
'-Dawt.useSystemAAFontSettings=lcd', '-Dswing.aatext=true']
} }
applicationDistribution.with { applicationDistribution.with {
@@ -62,8 +65,6 @@ shadowJar {
} }
startScripts { startScripts {
// The option -XX:+UseG1GC is only relevant for Java 8. Starting with Java 9 G1GC is already the default GC
defaultJvmOpts = ['-Xms128M', '-Xmx4g', '-Dawt.useSystemAAFontSettings=lcd', '-Dswing.aatext=true', '-XX:+UseG1GC']
doLast { doLast {
def str = windowsScript.text def str = windowsScript.text
str = str.replaceAll('java.exe', 'javaw.exe') str = str.replaceAll('java.exe', 'javaw.exe')