From cadb984bf2529c6bb262250bd3ac9f41193cded7 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Thu, 23 Apr 2009 15:18:10 -0700 Subject: [PATCH] Don't call vm_map_findspace() when MAP_TRYFIXED is specified. MAP_TRYFIXED is intended to return the requested address or an error. --- sys/vm/vm_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 074798301b..a3260374eb 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -3035,7 +3035,7 @@ vm_map_stack (vm_map_t map, vm_offset_t addrbos, vm_size_t max_ssize, /* * Find space for the mapping */ - if ((flags & MAP_FIXED) == 0) { + if ((flags & (MAP_FIXED | MAP_TRYFIXED)) == 0) { if (vm_map_findspace(map, addrbos, max_ssize, 1, flags, &tmpaddr)) { vm_map_unlock(map); -- 2.41.0