Addressing Data
This section describes how data can be addressed in a virtual memory object.
Data in a virtual memory object is made addressable in user or kernel processes through the shmat subroutine. A kernel extension uses the vm_att kernel service to select and allocate a region in the current (per-process kernel) address space.
The per-process kernel address space initially sees only global kernel memory and the per-process kernel data. The vm_att service allows kernel extensions to allocate additional regions. However, this augmented per-process kernel address space does not persist across system calls. The additional regions must be re-allocated with each entry into the kernel protection domain.
The vm_att service takes as an argument a virtual memory handle representing the virtual memory object and the access capability to be used. The vm_handle service constructs the virtual memory handles.
When the kernel extension has finished processing the data mapped into the current address space, it should call the vm_det service to deallocate the region and remove access.