Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_mmap.c
Context not available. | |||||
*/ | */ | ||||
pkm.pm_address = (uintptr_t) NULL; | pkm.pm_address = (uintptr_t) NULL; | ||||
if (vm_map_lookup_entry(map, addr, &entry)) { | if (vm_map_lookup_entry(map, addr, &entry)) { | ||||
for (; | for (; entry->start < addr + size; | ||||
entry != &map->header && entry->start < addr + size; | |||||
entry = entry->next) { | entry = entry->next) { | ||||
if (vm_map_check_protection(map, entry->start, | if (vm_map_check_protection(map, entry->start, | ||||
entry->end, VM_PROT_EXECUTE) == TRUE) { | entry->end, VM_PROT_EXECUTE) == TRUE) { | ||||
Context not available. | |||||
* up the pages elsewhere. | * up the pages elsewhere. | ||||
*/ | */ | ||||
lastvecindex = -1; | lastvecindex = -1; | ||||
for (current = entry; | for (current = entry; current->start < end; current = current->next) { | ||||
(current != &map->header) && (current->start < end); | |||||
current = current->next) { | |||||
/* | /* | ||||
* check for contiguity | * check for contiguity | ||||
*/ | */ | ||||
if (current->end < end && | if (current->end < end && current->next->start > current->end) { | ||||
(entry->next == &map->header || | |||||
current->next->start > current->end)) { | |||||
vm_map_unlock_read(map); | vm_map_unlock_read(map); | ||||
return (ENOMEM); | return (ENOMEM); | ||||
} | } | ||||
Context not available. |