The oom killer is a monkey with a gun. It’s a last resort when you were going to crash (or worse, hang) anyway.
You should have a much better “plan A” to avoid this situation.