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

@@ -47,6 +47,7 @@ public class Configuration {
private String proxy;
private int maxUploadingJob;
private int nbCores;
private int maxMemory; // max memory allowed for render
private int priority;
private ComputeType computeMethod;
private GPUDevice GPUDevice;
@@ -64,6 +65,7 @@ public class Configuration {
this.static_exeDirName = "exe";
this.maxUploadingJob = 1;
this.nbCores = -1; // ie not set
this.maxMemory = -1; // ie not set
this.priority = 19; // default lowest
this.computeMethod = null;
this.GPUDevice = null;
@@ -127,6 +129,14 @@ public class Configuration {
return this.nbCores;
}
public void setMaxMemory(int max) {
this.maxMemory = max;
}
public int getMaxMemory() {
return this.maxMemory;
}
public void setUsePriority(int priority) {
if (priority > 19)
priority = 19;