Limits system ram to 4GB

OpenJDK assumes total system RAM of 128GB. Setting it to 4GB manually
reduces the greediness of the JVM drastically.
This commit is contained in:
Florian Reimair 2020-03-11 14:20:59 +01:00
parent dbecc0a2f1
commit dc7a904a7f
No known key found for this signature in database
GPG Key ID: 05634D8D7A7954C8

View File

@ -133,6 +133,10 @@ configure([project(':cli'),
unixScriptFile.text = unixScriptFile.text.replace(
'cd "`dirname \\"$PRG\\"`/.." >/dev/null', 'cd "`dirname \\"$PRG\\"`" >/dev/null')
def script = file("${rootProject.projectDir}/bisq-$applicationName")
script.text = script.text.replace(
'DEFAULT_JVM_OPTS=""', 'DEFAULT_JVM_OPTS="-XX:MaxRAM=4GB"')
if (osdetector.os != 'windows')
delete fileTree(dir: rootProject.projectDir, include: 'bisq-*.bat')
else