* vm_object_init: * * Initialize the VM objects module. */
| 274 | * Initialize the VM objects module. |
| 275 | */ |
| 276 | void |
| 277 | vm_object_init(void) |
| 278 | { |
| 279 | TAILQ_INIT(&vm_object_list); |
| 280 | mtx_init(&vm_object_list_mtx, "vm object_list", NULL, MTX_DEF); |
| 281 | |
| 282 | rw_init(&kernel_object->lock, "kernel vm object"); |
| 283 | _vm_object_allocate(OBJT_PHYS, atop(VM_MAX_KERNEL_ADDRESS - |
| 284 | VM_MIN_KERNEL_ADDRESS), OBJ_UNMANAGED, kernel_object, NULL); |
| 285 | #if VM_NRESERVLEVEL > 0 |
| 286 | kernel_object->flags |= OBJ_COLORED; |
| 287 | kernel_object->pg_color = (u_short)atop(VM_MIN_KERNEL_ADDRESS); |
| 288 | #endif |
| 289 | kernel_object->un_pager.phys.ops = &default_phys_pg_ops; |
| 290 | |
| 291 | /* |
| 292 | * The lock portion of struct vm_object must be type stable due |
| 293 | * to vm_pageout_fallback_object_lock locking a vm object |
| 294 | * without holding any references to it. |
| 295 | * |
| 296 | * paging_in_progress is valid always. Lockless references to |
| 297 | * the objects may acquire pip and then check OBJ_DEAD. |
| 298 | */ |
| 299 | obj_zone = uma_zcreate("VM OBJECT", sizeof (struct vm_object), NULL, |
| 300 | #ifdef INVARIANTS |
| 301 | vm_object_zdtor, |
| 302 | #else |
| 303 | NULL, |
| 304 | #endif |
| 305 | vm_object_zinit, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); |
| 306 | |
| 307 | vm_radix_zinit(); |
| 308 | } |
| 309 | |
| 310 | void |
| 311 | vm_object_clear_flag(vm_object_t object, u_short bits) |
no test coverage detected