Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_fault.c
Show First 20 Lines • Show All 1,735 Lines • ▼ Show 20 Lines | #endif /* lint */ | ||||
if (upgrade && (dst_entry->eflags & MAP_ENTRY_NEEDS_COPY) == 0) { | if (upgrade && (dst_entry->eflags & MAP_ENTRY_NEEDS_COPY) == 0) { | ||||
dst_object = src_object; | dst_object = src_object; | ||||
vm_object_reference(dst_object); | vm_object_reference(dst_object); | ||||
} else { | } else { | ||||
/* | /* | ||||
* Create the top-level object for the destination entry. (Doesn't | * Create the top-level object for the destination entry. (Doesn't | ||||
* actually shadow anything - we copy the pages directly.) | * actually shadow anything - we copy the pages directly.) | ||||
*/ | */ | ||||
dst_object = vm_object_allocate(OBJT_DEFAULT, | dst_object = vm_object_anonymous( | ||||
atop(dst_entry->end - dst_entry->start)); | atop(dst_entry->end - dst_entry->start)); | ||||
#if VM_NRESERVLEVEL > 0 | #if VM_NRESERVLEVEL > 0 | ||||
dst_object->flags |= OBJ_COLORED; | dst_object->flags |= OBJ_COLORED; | ||||
dst_object->pg_color = atop(dst_entry->start); | dst_object->pg_color = atop(dst_entry->start); | ||||
#endif | #endif | ||||
dst_object->domain = src_object->domain; | dst_object->domain = src_object->domain; | ||||
dst_object->charge = dst_entry->end - dst_entry->start; | dst_object->charge = dst_entry->end - dst_entry->start; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 178 Lines • Show Last 20 Lines |