It is, in fact, possible to make a process immune to the OOM killer:
echo -17 > /proc/$PID/oom_adj
where $PID is the process ID you want to protect.
oom_adj can be tuned with other values to make a process more or less likely to be killed.
http://www.oracle.com/technetwork/articles/servers-storage-d...