* Returns the reservation to which the given page might belong. */
| 500 | * Returns the reservation to which the given page might belong. |
| 501 | */ |
| 502 | static __inline vm_reserv_t |
| 503 | vm_reserv_from_page(vm_page_t m) |
| 504 | { |
| 505 | #ifdef VM_PHYSSEG_SPARSE |
| 506 | struct vm_phys_seg *seg; |
| 507 | |
| 508 | seg = &vm_phys_segs[m->segind]; |
| 509 | return (seg->first_reserv + (VM_PAGE_TO_PHYS(m) >> VM_LEVEL_0_SHIFT) - |
| 510 | (seg->start >> VM_LEVEL_0_SHIFT)); |
| 511 | #else |
| 512 | return (&vm_reserv_array[VM_PAGE_TO_PHYS(m) >> VM_LEVEL_0_SHIFT]); |
| 513 | #endif |
| 514 | } |
| 515 | |
| 516 | /* |
| 517 | * Returns an existing reservation or NULL and initialized successor pointer. |
no outgoing calls
no test coverage detected