Changeset View
Changeset View
Standalone View
Standalone View
vm_map.c
Show First 20 Lines • Show All 2,186 Lines • ▼ Show 20 Lines | _vm_map_clip_start(vm_map_t map, vm_map_entry_t entry, vm_offset_t start) | ||||
KASSERT(entry->end > start && entry->start < start, | KASSERT(entry->end > start && entry->start < start, | ||||
("_vm_map_clip_start: invalid clip of entry %p", entry)); | ("_vm_map_clip_start: invalid clip of entry %p", entry)); | ||||
/* | /* | ||||
* Split off the front portion -- note that we must insert the new | * Split off the front portion -- note that we must insert the new | ||||
* entry BEFORE this one, so that this entry has the specified | * entry BEFORE this one, so that this entry has the specified | ||||
* starting address. | * starting address. | ||||
*/ | */ | ||||
if ((entry->eflags & MAP_ENTRY_NOMERGE_MASK) == 0 && | |||||
(vm_map_mergeable_neighbors(entry->prev, entry) || | |||||
vm_map_mergeable_neighbors(entry, entry->next))) { | |||||
printf("%s: simplifying entry start %jx end %jx next_read %jx " | |||||
"max_free %jx eflags %jx object-type %d\n", __func__, | |||||
(uintmax_t)entry->start, (uintmax_t)entry->end, | |||||
(uintmax_t)entry->next_read, (uintmax_t)entry->max_free, | |||||
(uintmax_t)entry->eflags, | |||||
entry->object ? entry->object->type : -1); | |||||
vm_map_simplify_entry(map, entry); | vm_map_simplify_entry(map, entry); | ||||
} | |||||
vm_map_entry_charge_object(map, entry); | vm_map_entry_charge_object(map, entry); | ||||
new_entry = vm_map_entry_create(map); | new_entry = vm_map_entry_create(map); | ||||
*new_entry = *entry; | *new_entry = *entry; | ||||
new_entry->end = start; | new_entry->end = start; | ||||
entry->offset += (start - entry->start); | entry->offset += (start - entry->start); | ||||
entry->start = start; | entry->start = start; | ||||
if (new_entry->cred != NULL) | if (new_entry->cred != NULL) | ||||
▲ Show 20 Lines • Show All 2,701 Lines • Show Last 20 Lines |