Extended Memory Manager

XMS services are implemented under MVDM using a virtual device driver known as the Virtual Extended Memory Manager (VXMM) which is represented by the file VXMS.SYS (VXMS). VXMM provides a separate XMS emulation for each VDM by placing most VXMS control structures in a per-VDM data area outside the V86 mode address space. The amount of memory available to a VDM, the number of handles, and the existence of Upper Memory Blocks (UMBs) are all configurable parameters which may be altered on a per-VDM basis.

The VXMM hooks interrupt vector 2Fh in order to announce its presence to applications. It also provides a V86 stub device driver (XMM 3X device driver), which indicates to DOS applications that XMS is available, but more importantly acts as a V86 mode interface between the application and the VXMM proper.

VXMM depends heavily upon the memory manager. XMS object allocation reallocation, and deallocation are accomplished by requesting corresponding services from the memory manager. When an application requests the allocation of a block of extended memory, for example, VXMS asks the memory manager to allocate a memory object in linear memory outside any VDM. Reallocation and deallocation are handled similarly.

All EMS functions are executed by calling the XMS Control Function, the address of which can be obtained by a call to INT 2Fh. Arguments are passed in registers.

Figure "Extended Memory Manager Control Flow"

During the initialization of the VDM the VDM Manager loads and initializes the XMM DOS stub device driver into the VDM address space. As soon as there is a XMS request the VDM Manager loads the the XMS virtual device driver VXMS.