Home > Commands A-M > Configuration Da-Dr

DEVICEHIGH


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Loads device driver you specify into the upper memory area. Loading a device driver into the upper memory area frees more bytes of conventional memory for other programs. If upper memory is not available, the DEVICEHIGH command functions just like the DEVICE command.

You can use this command only in your CONFIG.SYS file.


Syntax

MS-DOS 5 syntax:
DEVICEHIGH SIZE=hexsize [drive:][\path\]filename parameters

DEVICEHIGH [[/L:region1[,minsize1][;region2[,minsize2]]] [/S]]=[drive:][\path\]filename parameters


Parameters
[drive:][\path\] (v5.0)
Specifies the location of the device driver file.
filename (v5.0)
Specifies the name of the device driver file.
parameters (v5.0)
Specifies any command-line information required by the device driver.
size=hexsize (v5.0 ONLY)
Provides a means of overriding the amount of UMB memory that the operating system will allocate to the driver. Hexsize sets the allocation, in bytes, expressed in hexadecimal. By default, the operating system gives each driver the largest block and waits for it to free up the memory it doesn't need. You may need to use SIZE= for drivers which, after installation, need to have more memory available. Or for drivers which will work fine if you limit the amount of memory they consume.
Note: This switch relates to the memory needed for the driver code and its internally-used data. It is NOT used to size the memory buffers for drivers such as RamDrive.Sys or SmartDrv.Sys, which base their buffer allocations on values in parameters

Switches
/L:region1[,minsize1][;region2[,minsize2]] (v5.0)
Specifies one or more regions of memory into which to load the device driver. By default, the operating system loads the driver into the largest free upper-memory block (UMB) and makes all other UMBs available for the driver's use. You can use the /L switch to load the device driver into a specific region of memory or to specify which region(s) the driver can use.
To load the driver into the largest block in a specific region of upper memory, specify the region number after the /L switch. (To list the free areas of memory, use MEM /F at the command prompt.)
When loaded with the /L switch, a device driver can use only the specified memory region. Some device drivers use more than one area of memory; for those drivers, you can specify more than one region. (To find out how a particular device driver uses memory, issue the MEM /M command and specify the device-driver name as an argument.) To specify two or more regions, separate the block numbers with a semicolon (;).
Normally, the operating system loads a driver into a UMB in the specified region only if that region contains a UMB larger than the driver's load size (usually equal to the size of the executable program file). If the driver requires more memory while running than it does when loaded, you can use the minsize1 parameter to ensure that the driver will not be loaded into a UMB that is too small for it. If you specify a value for minsize1, the operating system loads the driver into that region only if it contains a UMB that is larger than both the driver's load size and the minsize1 value.
parameters (v5.0)
Shrinks the UMB to its minimum size while the driver is loading. Using this switch makes the most efficient use of memory. This switch is normally used only by the MemMaker program, which can analyze a device driver's memory use to determine whether the /S switch can safely be used when loading that driver. This switch can be used only in conjunction with the /L switch and affects only UMBs for which a minimum size was specified.

Related

For information about loading programs into the upper memory area, see the LOADHIGH command.
For information about loading device drivers into conventional memory, see the DEVICE command.
For information about using the MemMaker program to move programs to the upper memory area.


Notes
Using the DOS=UMB command

To use the DEVICEHIGH command, you must also include the DOS=UMB command in your CONFIG.SYS file. If you do not specify this command, all device drivers are loaded into conventional memory, as if you had used the DEVICE command.


Using MemMaker to optimize upper memory area automatically

The MemMaker program, included with the operating system, automatically optimizes your system's memory. MemMaker surveys the upper memory area, analyzes the memory use of your drivers and programs, and determines which drivers and programs fit best into the available UMBs. MemMaker then changes selected DEVICE commands in your CONFIG.SYS file to DEVICEHIGH commands and adds /L and /S switches as necessary.


Using MS-DOS 5 DEVICEHIGH syntax

The version of DEVICEHIGH provided with MS-DOS 5 used the syntax:

    DEVICEHIGH SIZE=hexsize [drive:][\path\]filename parameters

Although the MS-DOS 5 DEVICEHIGH syntax will still work with MS-DOS 6.22, it is strongly recommended that you use the current DEVICEHIGH syntax whenever possible.


Installing HIMEM.SYS and a UMB provider

To load a device driver into the upper memory area, your computer must have extended memory. You must use the DEVICE command once to install the HIMEM.SYS device driver and then again to install an upper-memory-block (UMB) provider. These commands must appear before the DEVICEHIGH command in your CONFIG.SYS file. If your computer has an 80386 or 80486 processor, you can use EMM386.EXE as the UMB provider. If your computer has a different processor, you must supply a different UMB provider.


If no upper memory area is available

If there is not enough upper memory area available to load the device driver you specified with the DEVICEHIGH command, the operating system will load it into conventional memory (as if you had used the DEVICE command).


Examples

The following CONFIG.SYS commands make the upper memory area available for running device drivers and programs:

    device=c:\dos\himem.sys
    device=c:\dos\emm386.exe ram
    dos=umb

Direct the operating system to load a device driver named MYDRIV.SYS into the upper memory area of an 80386 computer:

    DEVICEHIGH=mydriv.sys

Direct the operating system to run the MOUSE.SYS driver in the upper memory area and load the driver into upper memory block 2:

    DEVICEHIGH=/L:2 C:\drivers\mouse.sys

Loads the MYDRIV.SYS driver into region 1 of upper memory, and also allows the driver to use region 3 if it needs to:

    DEVICEHIGH=/L:1;3 C:\util\mydriv.sys

Load the same driver into upper memory regions 1 and 3, but only if each region is at least 30 bytes in size:

    DEVICEHIGH=/L:1,30;3,30 C:\util\mydriv.sys

Errorlevels

none.


Availability
External
DOS
v5.0 v5.0A v5.00.02 v5.001A v5.01 v5.02 v6.0 v6.10 v6.2 v6.21 v6.22 v6.23 v7.00 v7.0R1 v7.10 v8.00
Windows
none
Windows NT
none