benchexec
benchexec copied to clipboard
Soft memory limit
Similarly to time limits, BenchExec should support a "soft" memory limit. When it is reached and the kernel notifies us, we should send the TERM signal to the process, increase the memory limit, and let the process continue until it terminates or reaches the hard memory limit.
Cgroups seem to support getting notifications at arbitrary memory thresholds even before the actual memory limit is reached: https://www.kernel.org/doc/Documentation/cgroups/memory.txt, Section "9. Memory thresholds". This can simplify implementing this feature.