summaryrefslogtreecommitdiff
path: root/vm
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2014-09-06 11:55:48 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2014-09-06 11:58:59 +0200
commit5ae510e35c54009626999a88f0f1cb34d6dfc94f (patch)
tree30b238ea02bb8ea6522c55772ec09167bc1e81b1 /vm
parentce5ce65631b20514189a8abe39fc096db1e8837c (diff)
Make vm_map really ignore `address' when `anywhere' is true
As vm_allocate does. * vm/vm_user.c (vm_map): When `anywhere' is true, set `address' to the minimum address of the `target_map'.
Diffstat (limited to 'vm')
-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 f7c87cc0..1d8f37bb 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)) {