In Debian 6, how can I limit the total amount of memory (both resident set size and total virtual memory) that a user has access to?
I have tried setting limits via ulimit, but if a process spawns subprocesses, the subprocesses do not have their memory limited.
I have also tried setting limits via /etc/security/limits.conf, but these limits do not seem to apply to processes spawned from non-login shells, or to subprocesses.