Max memory settings can be set using human number with unit

This commit is contained in:
Laurent Clouet
2019-02-20 13:53:18 +01:00
parent 208f49ba1d
commit 388b1158bd
4 changed files with 34 additions and 19 deletions

View File

@@ -84,7 +84,7 @@ public class SettingsLoader {
cores = String.valueOf(cores_);
}
if (maxRam_ > 0) {
ram = String.valueOf(maxRam_);
ram = String.valueOf(maxRam_) + "k";
}
if (maxRenderTime_ > 0) {
renderTime = String.valueOf(maxRenderTime_);
@@ -350,7 +350,7 @@ public class SettingsLoader {
}
if (config.getMaxMemory() == -1 && ram != null) {
config.setMaxMemory(Long.valueOf(ram));
config.setMaxMemory(Utils.parseNumber(ram) / 1000); // internal ram value is in kB
}
if (config.getMaxRenderTime() == -1 && renderTime != null) {