You can build some kind of gen_server tracking process that periodically checks the assigned processes for memory and kills them if it exceeds a certain amount.
Using a combination of process_info(Pid, memory). calls process_info(Pid, memory). and exit(Pid, Reason) , this should be quite manageable.
chops source share