Is it possible to limit the amount of memory a process consumes from the command line and eventually automatically kill the process if it tries to overpass this limit?
Something like
MaxRam -4GB ./MyProcess args
For your information, I am on Mac OSX Version 10.11.3
.
ulimit
command which allows control over the resources "on systems that allow such control" (help ulimit
orman bash
for information), but I don't know if the limit extends to any or all subprocesses launched; if not OSX may have system programs to specify the limits on a program as it is run, but this would not be abash
internal command.