Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151317265
D20632.id58647.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D20632.id58647.diff
View Options
Index: head/sys/vm/vm_map.c
===================================================================
--- head/sys/vm/vm_map.c
+++ head/sys/vm/vm_map.c
@@ -2186,17 +2186,22 @@
VM_MAP_ASSERT_LOCKED(map);
KASSERT(entry->end > start && entry->start < start,
("_vm_map_clip_start: invalid clip of entry %p", entry));
+ vm_map_simplify_entry(map, entry);
/*
- * Split off the front portion -- note that we must insert the new
- * entry BEFORE this one, so that this entry has the specified
- * starting address.
+ * Create a backing object now, if none exists, so that more individual
+ * objects won't be created after the map entry is split.
*/
- vm_map_simplify_entry(map, entry);
vm_map_entry_charge_object(map, entry);
+
+ /* Clone the entry. */
new_entry = vm_map_entry_create(map);
*new_entry = *entry;
+ /*
+ * Split off the front portion. Insert the new entry BEFORE this one,
+ * so that this entry has the specified starting address.
+ */
new_entry->end = start;
entry->offset += (start - entry->start);
entry->start = start;
@@ -2244,14 +2249,20 @@
KASSERT(entry->start < end && entry->end > end,
("_vm_map_clip_end: invalid clip of entry %p", entry));
-
/*
- * Create a new entry and insert it AFTER the specified entry
+ * Create a backing object now, if none exists, so that more individual
+ * objects won't be created after the map entry is split.
*/
vm_map_entry_charge_object(map, entry);
+
+ /* Clone the entry. */
new_entry = vm_map_entry_create(map);
*new_entry = *entry;
+ /*
+ * Split off the back portion. Insert the new entry AFTER this one,
+ * so that this entry has the specified ending address.
+ */
new_entry->start = entry->end = end;
new_entry->offset += (end - entry->start);
if (new_entry->cred != NULL)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 8, 1:37 PM (15 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31100938
Default Alt Text
D20632.id58647.diff (1 KB)
Attached To
Mode
D20632: Restore commentary lost in r349203
Attached
Detach File
Event Timeline
Log In to Comment