## Virtual Device Driver Reference for OS/2

[prev][next][parent][TOC]

### Virtual Extended Memory Specification Device Driver

The Extended Memory Specification, Version 2 provides a standard interface for the use of extended memory on 80286- and 80386-based machines. The XMS specifications manage three distinct regions of memory:

High Memory Area (HMA). Extended memory accessible from real mode by enabling the A20 address line. Code can be executed in the HMA, if the A20 line is enabled. The high memory area is exactly 65520 bytes (64KB-16 bytes ) long.

Extended Memory Blocks (EMBs). Blocks of extended memory accessible by way of XMM function calls through a handle. Without leaving V86 mode, code cannot be executed from EMBs; they serve only for data storage. The specification offers up to 64MB of extended memory divided into as many as 255 blocks.

Upper Memory Blocks (UMBs). Block of memory located between 640KB and 1MB. Once a UMB is allocated, its memory is always available. Since the memory lies in conventional memory, code can be executed in it at any time.

The virtual extended memory specification (XMS) device driver:

Implements all the functions in XMS 2.0.

Provides each DOS session with a separate XMS emulation. Each DOS session has its own high memory area, upper memory blocks, and extended memory blocks so that features such as interprocess communication perform as if each DOS session was running on a different real 80386. A DOS session cannot affect the availability of objects, or access memory in another DOS session.

Provides configurable limits for the amount of XMM memory available across DOS sessions, and a limit per DOS session. An installed program in the start list should be able to override the per-DOS session limit, subject to the constraint given by the overall limit. In addition, it should be able to disable XMS completely for a particular DOS session, if its installation would conflict with the program running in the DOS session.

A CONFIG.SYS line of the form DEVICE=path\VXMS.SYS [options], will interpret options as "/keyword=value". These options are as follows:

/XMMLIMIT=g,i Set the global (system-wide) maximum memory usage of the virtual XMS device driver to gKB, and set a per-DOS session maximum of iKB. These values are large enough to accommodate an automatic 64KB allocation in each DOS session for the HMA. Values are restricted to the range 0 through 65535 (=64KB).

The values of g and i are rounded up to the nearest multiple of four. Specifying i=0 suppresses XMS installation in all DOS sessions unless overridden by a DOS session-specific configuration string. The default for /XMMLIMIT is 16384,2048.

/HMAMIN=d Set the minimum request size (in kilobytes) for an HMA request to succeed. Values are restricted to the range 0 through 63. The default for / HMAMIN is 0.

/NUMHANDLES=n Set the number of handles available in each DOS session. Each handle occupies eight bytes. Values are restricted to the range 0 through 128. The default for /NUMHANDLES is 32.

/UMB Instruct XMM to create Upper Memory Blocks (UMB). The default is / NOUMB.

/NOUMB Instruct XMM to not create Upper Memory Blocks (UMB). The default is /NOUMB.