API Mapping

The V86MMGR_Xlat_API service copies the data, it does not map it. Some virtual devices, however, need to map pages from extended address space into the 1 megabyte V86 address space. For example, the virtual NetBIOS device uses mapping to ensure that the proper physical memory is updated (regardless of which virtual machine is running) when an asynchronous network function completes execution. When memory is mapped using V86MMGR_Map_Pages, the service maps it to the same linear address in every virtual machine.

Mapping must not be used as an alternative to copying. It is faster to copy memory than to map it, because the memory manager does not need to perform any page table mapping and locking. Mapping also uses an address space in all virtual machines. Therefore, the mapping services should only be used for API functions that require memory mapped to the same address in every virtual machine. For the same reason, mapping must not be used to implement interprocess communication. If an IPC interface is needed, it should be implemented for protected-mode applications (which can share memory) or by copying the data.