FreeBSD/sys/i386/i386/pmap.c
/*
 * Returns TRUE if the given page is mapped individually or as part of
 * a 4mpage.  Otherwise, returns FALSE.
 */
Returns TRUE if the given page is mapped individually or as part of
a 4mpage.  Otherwise, returns FALSE.
Returns TRUE if the given page is mapped individually or as part of a 4mpage . Otherwise returns FALSE .
boolean_t
pmap_page_is_mapped(vm_page_t m)
{
	boolean_t rv;
	if ((m->oflags & VPO_UNMANAGED) != 0)
		return (FALSE);
	rw_wlock(&pvh_global_lock);
	rv = !TAILQ_EMPTY(&m->md.pv_list) ||
	    ((m->flags & PG_FICTITIOUS) == 0 &&
	    !TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list));
	rw_wunlock(&pvh_global_lock);
	return (rv);
}
boolean_t pmap_page_is_mapped ( vm_page_t m ) { boolean_t rv ; if ( ( m -> oflags & VPO_UNMANAGED ) != 0 ) return ( FALSE ) ; rw_wlock ( & pvh_global_lock ) ; rv = ! TAILQ_EMPTY ( & m -> md . pv_list ) || ( ( m -> flags & PG_FICTITIOUS ) == 0 && ! TAILQ_EMPTY ( & pa_to_pvh ( VM_PAGE_TO_PHYS ( m ) ) -> pv_list ) ) ; rw_wunlock ( & pvh_global_lock ) ; return ( rv ) ; }
Returns TRUE if the given page is mapped individually or as part of
 a 4mpage.
Returns TRUE if the given page is mapped individually or as part of a 4mpage .