From 04bb6e10cd2cbd0ee0de7fef3f81e88ebd43e6b4 Mon Sep 17 00:00:00 2001 From: jhb Date: Mon, 9 Sep 2013 18:11:59 +0000 Subject: Add a mmap flag (MAP_32BIT) on 64-bit platforms to request that a mapping use an address in the first 2GB of the process's address space. This flag should have the same semantics as the same flag on Linux. To facilitate this, add a new parameter to vm_map_find() that specifies an optional maximum virtual address. While here, fix several callers of vm_map_find() to use a VMFS_* constant for the findspace argument instead of TRUE and FALSE. Reviewed by: alc Approved by: re (kib) --- sys/kern/uipc_shm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/kern/uipc_shm.c') diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index 54366af..70829f3 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -954,7 +954,7 @@ shm_map(struct file *fp, size_t size, off_t offset, void **memp) ofs = offset & PAGE_MASK; offset = trunc_page(offset); size = round_page(size + ofs); - rv = vm_map_find(kernel_map, obj, offset, &kva, size, + rv = vm_map_find(kernel_map, obj, offset, &kva, size, 0, VMFS_OPTIMAL_SPACE, VM_PROT_READ | VM_PROT_WRITE, VM_PROT_READ | VM_PROT_WRITE, 0); if (rv == KERN_SUCCESS) { -- cgit v1.1