vm_map_lookup, vm_map_lookup_done — lookup the vm_object backing a given virtual region
Contents
Description
The vm_map_lookup() function attempts to find the vm_object, page index and protection, for the given
virtual address vaddr, in the map var_map, assuming a page fault of the type fault_type had occurred.
Return values are guaranteed until vm_map_lookup_done() is called to release the lock.
Implementation Notes
The function vm_map_lookup() acquires a read-lock on the map *var_map, but does not release it. The
caller should invoke vm_map_lookup_done() in order to release this lock.
Name
vm_map_lookup, vm_map_lookup_done — lookup the vm_object backing a given virtual region
Return Values
The vm_map_lookup() function returns KERN_SUCCESS, and sets the *object, *pindex, *out_prot, and
*out_entry arguments appropriately for the hypothetical page fault.
See Also
vm_map(9)
Synopsis
#include<sys/param.h>#include<vm/vm.h>#include<vm/vm_map.h>intvm_map_lookup(vm_map_t*var_map, vm_offset_tvaddr, vm_prot_tfault_type, vm_map_entry_t*out_entry,
vm_object_t*object, vm_pindex_t*pindex, vm_prot_t*out_prot, boolean_t*wired);
voidvm_map_lookup_done(vm_map_tmap, vm_map_entry_tentry);
