From 41ba6d4a4366807c759f8a29eb018183bd812b58 Mon Sep 17 00:00:00 2001 From: green Date: Fri, 7 May 2004 00:17:07 +0000 Subject: Properly remove MAP_FUTUREWIRE when a vm_map_entry gets torn down. Previously, mlockall(2) usage would leak MAP_FUTUREWIRE of the process's vmspace::vm_map and subsequent processes would wire all of their memory. Coupled with a wired-page leak in vm_fault_unwire(), this would run the system out of free pages and cause programs to randomly SIGBUS when faulting in new pages. (Note that this is not the fix for the latter part; pages are still leaked when a wired area is unmapped in some cases.) Reviewed by: alc PR kern/62930 --- sys/vm/vm_map.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/vm/vm_map.c') diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 71e6d6a..a8b9e83 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -513,6 +513,7 @@ _vm_map_init(vm_map_t map, vm_offset_t min, vm_offset_t max) map->min_offset = min; map->max_offset = max; map->first_free = &map->header; + map->flags = 0; map->root = NULL; map->timestamp = 0; } -- cgit v1.1