summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2011-05-09 22:49:05 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-05-09 22:54:14 +0200
commit4db43753567c628632f3391dd87d9b788d51dec8 (patch)
treefb8e231227b4ed8d83557c69ad1ac168492a0eb4
parent38154426c5c50e12d1cb743dbf81af3cb6fd18be (diff)
Do not warn on vm_map_enter with fixed address failing
* vm/vm_map.c (vm_map_enter): Warn about missing room in map only if anywhere is set.
-rw-r--r--vm/vm_map.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/vm/vm_map.c b/vm/vm_map.c
index 7ea0b95..751e031 100644
--- a/vm/vm_map.c
+++ b/vm/vm_map.c
@@ -767,10 +767,8 @@ kern_return_t vm_map_enter(
if (start < map->min_offset)
start = map->min_offset;
- if (start > map->max_offset) {
- printf_once("no more room for vm_map_enter in %p\n", map);
+ if (start > map->max_offset)
RETURN(KERN_NO_SPACE);
- }
/*
* Look for the first possible address;
@@ -858,10 +856,8 @@ kern_return_t vm_map_enter(
* the mask requirement.
*/
- if ((start & mask) != 0) {
- printf_once("no more room for vm_map_enter in %p\n", map);
+ if ((start & mask) != 0)
return(KERN_NO_SPACE);
- }
vm_map_lock(map);
@@ -881,10 +877,8 @@ kern_return_t vm_map_enter(
* ... the starting address isn't allocated
*/
- if (vm_map_lookup_entry(map, start, &temp_entry)) {
- printf_once("no more room for vm_map_enter in %p\n", map);
+ if (vm_map_lookup_entry(map, start, &temp_entry))
RETURN(KERN_NO_SPACE);
- }
entry = temp_entry;
@@ -894,10 +888,8 @@ kern_return_t vm_map_enter(
*/
if ((entry->vme_next != vm_map_to_entry(map)) &&
- (entry->vme_next->vme_start < end)) {
- printf_once("no more room for vm_map_enter in %p\n", map);
+ (entry->vme_next->vme_start < end))
RETURN(KERN_NO_SPACE);
- }
}
/*