diff --git a/README.client b/README.client index b5840ad0c143661886b1d01f1ee12c8ba1987247..14af8396d8e8024991f8736eadf83c0b6e48d54e 100644 --- a/README.client +++ b/README.client @@ -20,7 +20,7 @@ Arguments for running computations: Arguments for controlling computations: --usage show resource usage of all running computations - --limitmem MAXMEM change the maximum memory consumed by all computations + --limitmem MAXMEM set the maximum memory consumed by all computations [MiB] --list list all running computations --stop PGRP stop a given computation (number as listed in --list) --stopall stop all running computations @@ -43,5 +43,5 @@ Examples compctl --run ./satsolver data.sat | tee results.txt compctl --screen autotest-screen 5 - compctl --limitmem 4G + compctl --limitmem 4096 compctl --stop 27134 diff --git a/compctl.c b/compctl.c index 9151ea5460705c8a133f2ed8d681e7dc1079f01c..557125790e7cc38184454f6f3ad58b27785330f0 100644 --- a/compctl.c +++ b/compctl.c @@ -151,7 +151,8 @@ stop_all(void) void limit_mem(size_t limit) { - char cmd[256]; snprintf(cmd, sizeof(cmd), "limitmem %zu", limit); + char cmd[256]; + snprintf(cmd, sizeof(cmd), "limitmem %zu", limit * 1048576); char *line = daemon_chat(cmd); if (line[0] != '1') { /* TODO: Error message postprocessing. */