* vm_map_entry_back: * * Allocate an object to back a map entry. */
| 2373 | * Allocate an object to back a map entry. |
| 2374 | */ |
| 2375 | static inline void |
| 2376 | vm_map_entry_back(vm_map_entry_t entry) |
| 2377 | { |
| 2378 | vm_object_t object; |
| 2379 | |
| 2380 | KASSERT(entry->object.vm_object == NULL, |
| 2381 | ("map entry %p has backing object", entry)); |
| 2382 | KASSERT((entry->eflags & MAP_ENTRY_IS_SUB_MAP) == 0, |
| 2383 | ("map entry %p is a submap", entry)); |
| 2384 | object = vm_object_allocate_anon(atop(entry->end - entry->start), NULL, |
| 2385 | entry->cred, entry->end - entry->start); |
| 2386 | entry->object.vm_object = object; |
| 2387 | entry->offset = 0; |
| 2388 | entry->cred = NULL; |
| 2389 | } |
| 2390 | |
| 2391 | /* |
| 2392 | * vm_map_entry_charge_object |
no test coverage detected