From b11fa1d14dcd0c423c44976ff988b593de218a89 Mon Sep 17 00:00:00 2001 From: dillon Date: Wed, 31 Oct 2001 03:06:33 +0000 Subject: Don't let pmap_object_init_pt() exhaust all available free pages (allocating pv entries w/ zalloci) when called in a loop due to an madvise(). It is possible to completely exhaust the free page list and cause a system panic when an expected allocation fails. --- sys/vm/vm_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/vm/vm_map.c') diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 9bbe14b..8dc3550 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -1339,7 +1339,7 @@ vm_map_madvise( current->object.vm_object, pindex, (count << PAGE_SHIFT), - 0 + MAP_PREFAULT_MADVISE ); } } -- cgit v1.1