patch-2.0.32 linux/mm/mmap.c

Next file: linux/mm/page_alloc.c
Previous file: linux/mm/kmalloc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.31/linux/mm/mmap.c linux/mm/mmap.c
@@ -55,7 +55,8 @@
 	long freepages;
 	freepages = buffermem >> PAGE_SHIFT;
 	freepages += page_cache_size;
-	freepages >>= 1;
+	if (freepages <= (MAP_NR(high_memory) >> 4) + 48)
+		freepages >>= 1;
 	freepages += nr_free_pages;
 	freepages += nr_swap_pages;
 	freepages -= MAP_NR(high_memory) >> 4;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov