2 * Just panic() instead of the default behavior of selecting processes
6 * Modular OOM handlers for 2.6.4 (C) 2003,2004 Tvrtko A. Ursulin
8 * linux/mm/oom_kill.c (C) 1998,2000 Rik van Riel.
10 * Mark Huang <mlhuang@cs.princeton.edu>
16 #include <linux/sched.h>
17 #include <linux/swap.h>
20 * out_of_memory - is the system out of memory?
22 void out_of_memory(int gfp_mask)
25 * oom_lock protects out_of_memory()'s static variables.
26 * It's a global lock; this is not performance-critical.
28 static spinlock_t oom_lock = SPIN_LOCK_UNLOCKED;
29 static unsigned long count;
34 * If we have gotten only a few failures,
35 * we're not really oom.
41 * Ok, really out of memory. Panic.
44 printk("oom-killer: gfp_mask=0x%x\n", gfp_mask);
47 panic("Out Of Memory");
50 spin_unlock(&oom_lock);