Hot answers tagged

2

Yes—the two main approaches are setrlimit(2) and (on Linux) control groups. The main advantages of setrlimit is that it's simple and portable (specified by POSIX). You fork, then set limits for RLIMIT_AS and RLIMIT_CPU, then exec the code. The downside is that it's per-process, so the code could still fork to exceed the limit (each process it forks will ...


1

You should not delete files directly from system directories. Instead you should remove unneeded packages. In this manner, the system will remove unnecessary files and its dependences. Note: you can remove every file (but not directories) in /var/cache. Additionally old logs in /var/log/ could be removed. Check about unread system mails (/var/mail/ or ...



Only top voted, non community-wiki answers of a minimum length are eligible