]> git.pld-linux.org Git - packages/kernel.git/blob - linux-2.4.7-oom-killer.patch
- obsolete
[packages/kernel.git] / linux-2.4.7-oom-killer.patch
1 --- mm/oom_kill.c.orig  Thu Mar  1 18:57:11 2001
2 +++ mm/oom_kill.c       Thu Mar  1 18:58:23 2001
3 @@ -188,13 +188,17 @@
4   *
5   * Returns 0 if there is still enough memory left,
6   * 1 when we are out of memory (otherwise).
7 + *
8 + * Note that since __alloc_pages() never lets user
9 + * allocations go below freepages.min, we have to
10 + * use a slightly higher threshold here...
11   */
12  int out_of_memory(void)
13  {
14         long cache_mem, limit;
15
16         /* Enough free memory?  Not OOM. */
17 -       if (nr_free_pages() > freepages.min)
18 +       if (nr_free_pages() > freepages.min + 4)
19                 return 0;
20
21         if (nr_free_pages() + nr_inactive_clean_pages() > freepages.low)
22
23
This page took 0.029244 seconds and 3 git commands to generate.