MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vm_reserv_from_page

Function vm_reserv_from_page

freebsd/vm/vm_reserv.c:502–514  ·  view source on GitHub ↗

* Returns the reservation to which the given page might belong. */

Source from the content-addressed store, hash-verified

500 * Returns the reservation to which the given page might belong.
501 */
502static __inline vm_reserv_t
503vm_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.

Callers 9

vm_reserv_from_objectFunction · 0.85
vm_reserv_alloc_contigFunction · 0.85
vm_reserv_alloc_pageFunction · 0.85
vm_reserv_free_pageFunction · 0.85
vm_reserv_is_page_freeFunction · 0.85
vm_reserv_levelFunction · 0.85
vm_reserv_renameFunction · 0.85
vm_reserv_to_superpageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected