Allow user to set maximum memory he allows render to use

This commit is contained in:
Laurent Clouet
2017-03-29 22:13:04 +02:00
parent 42e952bddf
commit 905fff3313
6 changed files with 85 additions and 8 deletions

View File

@@ -291,7 +291,7 @@ public class Server extends Thread implements HostnameVerifier, X509TrustManager
HttpURLConnection connection = null;
try {
OS os = OS.getOS();
String url = String.format("%s?computemethod=%s&cpu_cores=%s", this.getPage("request-job"), this.user_config.computeMethodToInt(), ((this.user_config.getNbCores() == -1) ? os.getCPU().cores() : this.user_config.getNbCores()));
String url = String.format("%s?computemethod=%s&cpu_cores=%s&ram_max=%s", this.getPage("request-job"), this.user_config.computeMethodToInt(), ((this.user_config.getNbCores() == -1) ? os.getCPU().cores() : this.user_config.getNbCores()), this.user_config.getMaxMemory());
if (this.user_config.getComputeMethod() != ComputeType.CPU && this.user_config.getGPUDevice() != null) {
String gpu_model = "";
try {