> You can’t cap memory, but ...
Why not? That'd be useful. Feels like a software written in C should make that reasonably easy.
ulimit?
or more probably the c api setrlimit(2)
Seconded
ulimit?
or more probably the c api setrlimit(2)