Snippets Quickly limit resources for the process with ulimit LIMIT_MB=50 (ulimit -Sv $((LIMIT_MB << 10)); /path/to/binary) On OpenBSD use ulimit -Sd