--- zzzz-none-000/linux-2.4.17/mm/oom_kill.c 2001-11-04 01:05:25.000000000 +0000 +++ sangam-fb-322/linux-2.4.17/mm/oom_kill.c 2004-11-24 13:22:33.000000000 +0000 @@ -1,4 +1,4 @@ -/* + /* * linux/mm/oom_kill.c * * Copyright (C) 1998,2000 Rik van Riel @@ -202,6 +202,17 @@ unsigned long now, since; /* + * This is a trade off for embedded systems that typically + * have no swap devices. By just returning here we run + * the risk of getblk looping forever and hanging the system. . . + * having your embedded application killed doesn't quite work, + * but neither does hanging the system. If the apps don't + * completely exhaust memory they'll keep running forever, as our + * QA tests have shown. + */ +#ifdef CONFIG_EMBEDDED_OOM_KILLER + + /* * Enough swap space left? Not OOM. */ if (nr_swap_pages > 0) @@ -242,4 +253,5 @@ reset: first = now; count = 0; +#endif /* CONFIG_OOM_KILLER */ }