summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vm/vm_user.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/vm/vm_user.c b/vm/vm_user.c
index f7c87cc..1d8f37b 100644
--- a/vm/vm_user.c
+++ b/vm/vm_user.c
@@ -336,7 +336,10 @@ kern_return_t vm_map(
if (size == 0)
return KERN_INVALID_ARGUMENT;
- *address = trunc_page(*address);
+ if (anywhere)
+ *address = vm_map_min(target_map);
+ else
+ *address = trunc_page(*address);
size = round_page(size);
if (!IP_VALID(memory_object)) {