From: Matthew Dillon Date: Thu, 23 Apr 2009 22:18:10 +0000 (-0700) Subject: Don't call vm_map_findspace() when MAP_TRYFIXED is specified. X-Git-Tag: v2.3.1~65 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/cadb984bf2529c6bb262250bd3ac9f41193cded7 Don't call vm_map_findspace() when MAP_TRYFIXED is specified. MAP_TRYFIXED is intended to return the requested address or an error. --- 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);