Index: sys/sys/mman.h =================================================================== RCS file: /usr/cvs/FreeBSD/src/sys/sys/mman.h,v retrieving revision 1.40 diff -u -r1.40 mman.h --- sys/sys/mman.h 2 Apr 2005 12:33:31 -0000 1.40 +++ sys/sys/mman.h 16 Jun 2005 15:20:32 -0000 @@ -87,6 +87,7 @@ * Extended flags */ #define MAP_NOCORE 0x00020000 /* dont include these pages in a coredump */ +#define MAP_TRYFIXED 0x00040000 /* take hint more seriously */ #endif /* __BSD_VISIBLE */ #if __POSIX_VISIBLE >= 199309 Index: sys/vm/vm_mmap.c =================================================================== RCS file: /usr/cvs/FreeBSD/src/sys/vm/vm_mmap.c,v retrieving revision 1.200 diff -u -r1.200 vm_mmap.c --- sys/vm/vm_mmap.c 14 Apr 2005 16:03:30 -0000 1.200 +++ sys/vm/vm_mmap.c 17 Jun 2005 17:34:32 -0000 @@ -256,6 +256,8 @@ addr -= pageoff; if (addr & PAGE_MASK) return (EINVAL); + } + if (flags & (MAP_FIXED | MAP_TRYFIXED)) { /* Address range must be all in user VM space. */ if (addr < vm_map_min(&vms->vm_map) || addr + size > vm_map_max(&vms->vm_map))