[Front] [Prev Chapter] [Next Chapter]

Chapter 10 Managing Memory

Types of Memory

Displaying the Current Memory Configuration

DR-DOS Memory Managers

Making More Memory Available

Optimizing Memory Using SETUP

Optimizing Memory at the System Prompt

Optimizing Memory by Editing CONFIG.SYS

Additional Tips for Managing Memory


This chapter describes the different kinds of memory that could be available and how you can optimize the way in which the operating system uses that memory.

Types of Memory

The following table describes the different types of memory that your computer may have.

Table 10-1
Types of Memory

Type of Memory

Description

Conventional

The first 640 KB of memory on a computer. Conventional memory is required, and directly addressable, by all DOS-based applications. Lower memory refers to the lowest 64 KB of conventional memory; this is where the operating system and device drivers are usually loaded; the remaining area of conventional memory contains most of your data and programs. Most DOS-based applications can only run in conventional memory but you can optimize your system's memory configuration to take advantage of other memory types and make as much conventional memory as possible available to your applications.

Upper

The 384 KB of memory above conventional memory. This area of memory is used by various elements of your system hardware, such as the video display adapter or network adapter. Unused upper memory, however, may be available for loading device drivers and memory-resident programs.

Extended (XMS)

Memory above 1 MB on computers with 80286 and 386* (and later) microprocessors. An extended memory manager is required to use extended memory; DR-DOS includes the EMM386 and HIMEM memory managers for this purpose. Some applications, such as MS Windows, require extended memory. XMS (Extended Memory Specification) refers to the protocol that provides a standard interface to upper and extended memory and allows it to be accessed via the DR-DOS memory managers.

In order to use extended memory, an 80286 or 386 (and later) computer must run in protected mode as opposed to real mode. 386 (and later) machines can also run in virtual 8086 mode, which means that although the computer appears to be running in real mode as far as an application is concerned, protected mode features are available.

High (HMA)

The first 64 KB of extended memory, also referred to as the High Memory Area or HMA. The operating system, by default, is set to run in high memory so that more conventional memory is available for your applications. The HMA is special extended memory because it can be accessed when the computer is running in real mode; refer to the explanation of real and protected mode in the description of extended memory (above).

Expanded (EMS)

Memory (additional to conventional memory) that some DOS-based applications can use. This memory, which conforms to the Lotus*/Intel*/Microsoft* (LIM) Expanded Memory Specification (EMS), is referred to as expanded or EMS memory. Originally, expanded memory was provided by an expanded memory board fitted inside the computer that came with an expanded memory manager. The EMM386 memory manager, however, can now emulate expanded memory, on a 386 (or later) computer, for applications that need it. Some applications can use EMS memory via a
64 KB part of upper memory called the page frame. This area is reserved in upper memory by the memory manager when expanded memory is required.


Memory Map Showing Upper, High and Extended Memory

Displaying the Current Memory Configuration

Before you begin making changes to optimize the way in which your system uses memory, it is important that you know what types of memory are available on your computer and how memory is currently being used.

The MEM command displays extensive information about memory usage. Refer to the ``Command Reference'' chapter of DOSBook for a detailed description of the MEM command. For a brief description of MEM and its options, simply enter either of the following version of the MEM command at the system prompt:

MEM /?
MEM /H

DR-DOS Memory Managers

To access extended, expanded, or upper memory, the operating system includes memory managers. A memory manager is a special device driver that provides access to different memory types. The memory manager you use depends on what type of hardware you are using.

EMM386

The EMM386 memory manager provides access to the upper memory area. It also uses extended memory to emulate expanded (EMS) memory for those applications that need it.

Use EMM386 if your computer is a 386-based machine or later.

EMM386 is loaded and configured by a DEVICE statement in the CONFIG.SYS file. This statement is automatically placed in CONFIG.SYS when you choose to load the 386 memory manager during SETUP (or INSTALL). The configuration of EMM386 depends on the values you set in SETUP and on changes you make yourself to CONFIG.SYS.

The full syntax of the EMM386 DEVICE statement is as follows:

DEVICE = C:\DRDOS\EMM386.EXE [[/]?|[/]H] [[/]AUTO]
[[
/]COMPAQ[=ON|OFF]] [[/]DPMI[=ON|OFF]]
[[
/]EXCLUDE=start-end[,start-end]...]
[[
/]FRAME=AUTO|NONE|address] [[/]GATEA20=type]
[[
/]INCLUDE=start-end[,start-end]...]
[[
/]INT15=kb] [[/]MULTI[=ON|OFF]] [[/]OFF] [[/]ON]
[[
/]ROM=start-end[,start-end]...]
[[
/]USE=start-end[,start-end]...]
[[
/]VIDEO[=[start-]end]] [[/]VXD=path]
[[
/]WEITEK=ON|OFF] [[/]WINSTD] [[/]XBDA] [[/]XMSUMB]

The following table describes the EMM386 options. For information about specifying these options, either through SETUP or by editing CONFIG.SYS yourself, see ``Making More Memory Available'' on page 10-10.

Option

Description

[/]? or [/]H

Displays help text.

[/]AUTO

Switches the memory manager ON and OFF automatically, as required. This is the default.

[/]COMPAQ[=ON | OFF]

Controls COMPAQ* support. By default on a COMPAQ computer (386 and later), support is enabled to provide an additional 256 KB of memory. Use the COMPAQ switch if you experience problems and want to disable this support (COMPAQ=OFF).

[/]DPMI[=ON | OFF]

Provides DOS Protected Mode Interface (DPMI) support. If ON or OFF is not specified, ON is assumed. You can also enable or disable DPMI temporarily at the system prompt by entering DPMI=ON or DPMI=OFF.

[/]EXCLUDE=start-end[,start-end]...

Forces the memory manager to exclude the specified areas of upper memory when it searches for usable memory; start and end are the starting and ending segment addresses of each area to exclude.

[/]FRAME=AUTO | NONE | address

Enables expanded (EMS) memory emulation. AUTO (the default) lets the memory manager locate the page frame; NONE disables EMS emulation; address identifies a specific location in upper memory.

[/]GATEA20=type

Specifies handling of control address line A20. The memory manager normally detects the machine type automatically but in certain situations you may need to specify it yourself. Type can be one of the following:
AT Standard AT*
HP Hewlett-Packard* Vectra*
MCA MCA (such as PS/2*) or compatible
XMS Third-party XMS driver

[/]INCLUDE=start-end[,start-end]...

Tells the memory manager to test the specified areas of upper memory when it searches for usable memory; start and end are the starting and ending segment addresses of each area to include.

[/]INIT15=kb

Reserves the specified amount (kb) of extended memory for use by third-party software that cannot use XMS or expanded (EMS) memory.

[/]MULTI[=ON | OFF]

Provides support for multitasking. This switch is added automatically when you choose to load the multitasking software in SETUP. If ON or OFF is not specified, ON is assumed.

[/]OFF

Turns the memory manager OFF. The computer is permanently in real mode.

[/]ON

Turns the memory manager ON. The computer is permanently in protected/virtual 8086 mode.

[/]ROM=start-end[,start-end]...
| AUTO | NONE

Copies slow Read-Only Memory (ROM) into fast Random Access Memory (RAM); start and end specify the starting and ending segment addresses of each area of ROM to copy, AUTO copies all slow ROM to RAM, and NONE disables copying.

[/]USE=start-end

Forces the memory manager to use a specified area of upper memory when it searches for usable memory; start and end are the starting and ending segment addresses of the area to use.

[/]VIDEO[=[start-]end]

Makes unused video memory space available to applications when all the video memory is not being used by the video display adapter. Video memory (the upper memory immediately above 640 KB) is normally reserved for use by the video display adapter.

[/]VXD=path

Specifies the location of the EMM386 VxD, if necessary, to MS Windows 3.0 or later in Enhanced mode. By default, the VxD is located in the directory from which the memory manager is loaded.

[/]WEITEK=ON | OFF

Enables or disables DOS access to the Weitek* coprocessor, if fitted on your machine.

[/]WINSTD

Provides support for MS Windows 3.0 in Standard (80286) mode. MS Windows 3.0 in Standard mode requires upper memory to be disabled.

[/]XBDA

Keeps the extended BIOS data area (XBDA) at the top of conventional memory, for applications that require it to be there. If you enable sharing of video memory (/VIDEO), the memory manager automatically moves the XBDA to the bottom of conventional memory to allow contiguous memory.

[/]XMSUMB

By default XMS calls to use upper memory blocks have been disabled. To enable this support, use the command line option /XMSUMB in CONFIG.SYS.

HIMEM

The HIMEM memory manager provides access to the upper memory area. The features provided by HIMEM, however, will depend on your hardware. If you are using a 286-based computer with extended memory, the only HIMEM feature you may be able to use is relocation of the DOS software to high memory. If you have a chip set or expanded memory board, you can use other HIMEM features.

Use HIMEM if your computer is 80286-based. Also use HIMEM if you are using a pre-386 machine that has any of the following:

NOTE: If you are using a machine with one of the chip sets mentioned above, HIMEM can only initialize upper memory if you have enabled Shadow RAM and if Shadow RAM is available. Your machine's hardware setup program, which is normally invoked by a special keyboard sequence during reset, enables Shadow RAM. However, the setup program usually allows you to move ROM into RAM as well; ensure that you leave Shadow RAM available for HIMEM. Otherwise, the only HIMEM feature you will be able to use is the relocation of the operating system software to high memory.

HIMEM is loaded and configured by a DEVICE statement in the CONFIG.SYS file. This statement is automatically placed in CONFIG.SYS when you choose to load the 80286 memory manager during SETUP (or INSTALL). The configuration of HIMEM depends on the values you set in SETUP and on changes you make yourself to CONFIG.SYS.

The full syntax of the HIMEM DEVICE statement is as follows:

DEVICE = C:\DRDOS\HIMEM.SYS
[/CHIPSET=AUTO|chipset|NONE]
[
/EXCLUDE=start-end[,start-end]...]
[
/INCLUDE=start-end[,start-end]...]
[
/ROM=start-end[,start-end]...|AUTO|NONE]
[
/USE=start-end] [/VIDEO[=[start-]end]] [/XBDA]
The following table describes the HIMEM options. For information about specifying these options, either through SETUP or by editing CONFIG.SYS yourself, see ``Making More Memory Available'' on page 10-10.

Option

Description

/CHIPSET=AUTO| chipset|NONE

Specifies the chip set type of your computer. You may need to specify this information if the memory manager has difficulty mapping Shadow RAM into upper memory. AUTO (the default) allows the memory manager to determine the chip set or memory type automatically and NONE disables mapping of Shadow RAM. For a complete list of the values you can specify for chipset, see "Specifying the Chip Set or Memory Type (HIMEM Only)" on page 10-19.

/EXCLUDE=start-end[,start-end]...

Forces the memory manager to exclude the specified areas of upper memory when it searches for usable memory; start and end are the starting and ending segment addresses of each area to exclude.

/INCLUDE=start-end[,start-end]...

Tells the memory manager to test the specified areas of upper memory when it searches for usable memory; start and end are the starting and ending segment addresses of each area to include.

/ROM=start-end | AUTO | NONE

Copies slow Read-Only Memory (ROM) into fast Random Access Memory (RAM); start and end specify the starting and ending segment addresses of an area of ROM to copy, AUTO copies all slow ROM to RAM, and NONE disables copying.

/USE=start-end

Forces the memory manager to use a specified area of upper memory when it searches for usable memory; start and end are the starting and ending segment addresses of the area to use.

/VIDEO[=[start-]end]

Makes unused video memory space available to applications when all the video memory is not being used by the video display adapter. Video memory (the upper memory immediately above 640 KB) is normally reserved for use by the video display adapter.

/XBDA

Keeps the extended BIOS data area (XBDA) at the top of conventional memory, for applications that require it to be there. If you enable sharing of video memory (/VIDEO), the memory manager automatically moves the XBDA to the bottom of conventional memory to allow contiguous memory.

EMMXMA

EMMXMA is a memory manager that provides EMS (expanded) memory for applications that can take advantage of it.

EMMXMA converts extended memory on XMA-compatible memory cards to expanded memory, which is mapped to a 64 KB window in upper memory.

To load and configure EMMXMA, add a DEVICE statement to the CONFIG.SYS file as follows:

DEVICE = C:\DRDOS\EMMXMA.SYS 
[/FRAME=address] [/KB=nnnn]
The following table describes the EMMXMA options:

Option

Description

/FRAME=address

Specifies the hexadecimal address for the start of the 64 KB mapping window. If you do not specify this option, EMMXMA automatically searches upper memory between C000H and DFFFH for a free 64 KB window.

/KB=nnnn

Specifies the total amount of extended memory to be allocated for EMS (expanded memory). If you do not specify this option, all available memory is used for EMS.

Making More Memory Available

Most programs require conventional memory; when a program fails to run, it is often because there is insufficient conventional memory available for it. You can make more conventional memory available for applications by minimizing the amount of conventional memory used by the operating system, device drivers, and other memory-resident programs. You can maximize the amount of available conventional memory in the following ways, all of which are described in detail in this chapter:

Optimizing Memory Using SETUP

SETUP is a program that allows you to make changes to the system configuration. Refer to Chapter 9, ``Configuring the System'' for information about how to start the program. The following sections describe how to use the memory management portions of SETUP.

Loading and Configuring the Memory Manager

Before you can take advantage of extended, expanded, or upper memory, you must load a memory manager that enables these memory types. To load the memory manager, run SETUP, choose DOS System and Memory Management, choose Memory Manager, and then choose to load either the 386 (and later) memory manager (EMM386) or the 80286 memory manager (HIMEM), depending on your hardware.

After you choose to load a memory manager and exit SETUP, the CONFIG.SYS file is automatically updated with a DEVICE statement that loads the memory manager. The next time you boot your machine, the memory manager is automatically loaded and configured as specified in the DEVICE statement.

The options available for the memory managers are described in ``DR-DOS Memory Managers'' on page 10-4. You can set many of these values in SETUP; the following sections describe how to do this.

Copying Slow ROM into Fast RAM (EMM386 and HIMEM)

The EMM386 and HIMEM memory managers can automatically copy data from read-only memory (ROM), which often executes slowly, to Random Access Memory (RAM), which executes much faster. EMM386 and HIMEM ensure that the RAM to which they copy ROM has the same address. Copying ROM to RAM is particularly useful when you have a video card that calls ROM to output characters, for example; character output will be faster.

To specify the ROM option in SETUP, choose to load either EMM386 or HIMEM, choose to configure the memory manager, and then choose to copy ROM to RAM.

If you want to specify particular memory areas from which to copy ROM, choose <Advanced Options screen>. You will see a memory table that can help you specify areas of memory. See ``Advanced Memory Options'' on page 10-13 for more information.

Providing LIM 4.0 EMS Support (EMM386 Only)

EMM386 can use extended memory to emulate an expanded memory driver, for applications that use LIM EMS 4.0 (expanded) memory. This means that expanded memory is available without a special add-on memory board.

To provide expanded memory support, enable the EMM386 FRAME option by running SETUP, choosing to configure EMM386, and then selecting LIM 4.0 EMS support.

If you want to specify the location in memory for the LIM EMS page frame, choose <Advanced Options screen>. You will see a memory table that can help you specify a location. See ``Advanced Memory Options'' on page 10-13 for more information.

Supporting MS Windows 3.0 in Standard Mode (EMM386 Only)

If you are using MS Windows 3.0 in Standard (80286) mode, the program will not normally run under EMM386. EMM386 can support MS Windows 3.0 in Standard mode, however, if you choose to enable the WINSTD option, to disable upper memory. Do this by running SETUP, choosing to configure EMM386, and then selecting support for MS Windows 3.0 in Standard mode.

Using Spare Video Memory Space for RAM (EMM386 and HIMEM)

The video memory on your computer immediately above 640 KB is used by EGA/VGA video display adapters for displaying high resolution graphics. If high resolution graphics are not required, however, EMM386 and HIMEM can make the spare memory available for applications. This can provide up to 96 KB of additional memory, depending on the kind of video display adapter you have: 64 KB if you have an MDA, Hercules*, or EGA/VGA (monochrome) adapter and 96 KB if you have a CGA or EGA/VGA (color) adapter.

To make spare video memory available, run SETUP, choose to configure EMM386 or HIMEM, and select to use spare video memory space for RAM. If you specify this option, the default is to use all spare video memory space, beginning at segment address A000. You can specify an ending segment address for the memory, but only by editing CONFIG.SYS yourself; refer to for the table of EMM386 options in ``DR-DOS Memory Managers'' on page 10-4 for the VIDEO option syntax.

NOTE: If you have an EGA or VGA video display adapter, /VIDEO only reserves video memory. Before it can be made available, you must also run MEMMAX +V to enable the use of video memory. If you want to use graphics, you must return the video memory to the video display adapter by running MEMMAX -V. MEMMAX +V and MEMMAX -V can be run at the system prompt or in AUTOEXEC.BAT. See ``Enabling and Disabling Lower, Upper, and Video Memory'' on page 10-16 for more information about the MEMMAX command.

Loading DPMI (EMM386 Only)

You can load the DOS Protected Mode Interface (DPMI) if you are using programs that require it.

To load DPMI, run SETUP, choose to configure EMM386, and then choose to load DPMI. When you exit SETUP, the DPMI option is automatically added in CONFIG.SYS and when you next boot the machine, this change takes effect.

To temporarily enable or disable DPMI, you can use the following command at the system prompt:

DPMI=ON|OFF

Reserving Extended Memory for non-XMS/LIM Applications (EMM386 Only)

EMM386 can reserve a certain amount of extended memory for applications that cannot use XMS or LIM 4.0 EMS (expanded) memory.

To specify the amount of reserved memory in SETUP, choose to configure EMM386 and then enter the amount. This will automatically set the INT15 option and the change will take effect the next time you boot the machine.

Advanced Memory Options

If you choose <Advanced Options screen> when configuring EMM386 or HIMEM in SETUP, you see a table which indicates how memory is currently being used. You can set the following options for EMM386 or HIMEM on this screen:

You can also set the following option, if you are using EMM386:

Running DOS in High or Upper Memory

If you do not have extended memory, the operating system software is loaded in the lowest part of conventional memory (DOS=LOW).

If your computer has extended memory, however, you can make more conventional memory available to your applications by running the DOS software in the High Memory Area (HMA) and in upper memory (when the HMA is not available). DOS=HIGH,UMB is the default for the operating system when extended memory is available. In order for high or upper memory to be enabled, a memory manager (EMM386 or HIMEM) must be loaded first. Refer to ``Loading and Configuring the Memory Manager'' on page 10-10 for information about memory managers.

You can also force the operating system software to use the HMA or upper memory exclusively (DOS=HIGH or DOS=UMB).

To change the default location of the operating system, run SETUP, choose DOS System and Memory Management, and then choose Memory Manager. You can specify Conventional Memory, Upper Memory, or High Memory. SETUP automatically updates the DOS command in CONFIG.SYS and the next time you boot your machine, the new DOS setting takes effect.

NOTE: When you choose High Memory, DOS=HIGH,UMB is added in CONFIG.SYS. To specify high memory only edit the CONFIG.SYS file manually.

Loading DPMS Software

Load the DOS Protected Mode Services (DPMS) driver (DPMS.EXE) when you are using Stacker* disk compression, the NWCACHE program, DELWATCH, or the Personal NetWare server (SERVER.EXE), all of which use DPMS to reduce the amount of space they occupy in conventional memory. DPMS allows these programs to run in protected mode, outside of conventional memory. Load the DPMS software by running SETUP, choosing DOS System and Memory Management, choosing Memory Manager, and then choosing to load DPMS. You must have a memory manager (EMM386 or HIMEM) loaded before DPMS can load.

Optimizing Memory at the System Prompt

The following sections describe the commands you can use at the system prompt to optimize memory, assuming that upper memory is made available by a memory manager (EMM386 or HIMEM).

Running a Program in Upper Memory

You can load and execute a specified program in upper memory, rather than conventional memory, by using the HILOAD or LOADHIGH command at the system prompt. This command can be abbreviated to LH. The full syntax of the command is as follows:

HILOAD|LOADHIGH|LH [/?|/H] filespec
If you specify /? or /H, you see online help about the HILOAD/LOADHIGH command.

You must specify the filespec of the program you want to load high. This program will load and execute in upper memory, as long as upper memory is enabled by a memory manager (EMM386 or HIMEM) and is available.

NOTE: You cannot use HILOAD/LOADHIGH if you are using a third-party memory manager because third-party memory managers use different methods of mapping upper memory from EMM386 or HIMEM. Third-party memory managers usually provide their own utilities to load programs into upper memory.

The program will remain in upper memory until the next time you start the operating system.

If you want to load a program high every time you start the operating system, place the HILOAD or LOADHIGH command in AUTOEXEC.BAT rather than running it every time at the system prompt.

It is recommended that you load the following programs high if you want to use them: CURSOR.EXE, GRAPHICS.COM, GRAFTABL.COM, and JOIN.EXE. The following programs, however, will attempt to load themselves high by default, so there is no need to load them high yourself: KEYB.COM, NLSFUNC.EXE, and SHARE.EXE.

Enabling and Disabling Lower, Upper, and Video Memory

You can control lower, upper, and video memory at the system prompt, when required, by using the MEMMAX command. MEMMAX allows you to temporarily enable and disable memory areas. Some applications may not work properly when certain memory types are enabled or disabled.

The full syntax of the MEMMAX command is as follows:

MEMMAX [/?|/H] [-|+L] [/L] [-|+U] [/U] [-|+V] [/V]
If you specify /? or /H, you see online help about the MEMMAX command.

When you load the DOS software into high or upper memory, the lower (conventional) memory normally used by DOS is made available to applications. Some applications, however, will not work correctly in lower memory and may require lower memory to be disabled. Use MEMMAX -L to disable lower memory and MEMMAX +L to re-enable it. Use MEMMAX /L to display the current status of lower memory.

Because some applications are sensitive to upper memory, it is disabled by default when you start the operating system. Unless you are using HILOAD or LOADHIGH (which automatically enables and then disables upper memory), you may need to enable upper memory yourself in order to load device drivers and programs high. Use MEMMAX +U to enable upper memory and MEMMAX -U to disable it again. Use MEMMAX /U to display the current status of upper memory.

When you are using an EGA or VGA video display adapter, and you reserved video memory space by configuring the memory manager, you will need to enable the video memory with MEMMAX +V before it can be used by applications. To disable the use of video memory, use MEMMAX -V. Use MEMMAX /V to display the current status of video memory.

If you want a MEMMAX command to take effect every time you start the operating system, place it in AUTOEXEC.BAT rather than running it every time at the system prompt.

Switching EMM386 Between Protected Mode and Real Mode

The EMM386 memory manager is enabled automatically when it is required, providing extended memory according to the way in which it is configured in CONFIG.SYS. Some applications require the computer to be running in real mode, rather than protected or virtual 8086 mode, when they load. You can temporarily place the computer into real mode at the system prompt by disabling EMM386. Use EMM386 at the system prompt as follows:

EMM386 [[/]AUTO|OFF|ON]

EMM386 OFF puts the computer in real mode, EMM386 ON puts it back in protected/virtual 8086 mode, and EMM386 AUTO (the default) lets the memory manager turn itself off if possible but stays on when required.

NOTE: You may not be able to turn EMM386 off at the system prompt if the memory manager is providing upper memory or some other feature that requires protected mode. If this is the case, you must add the OFF option to the EMM386 DEVICE statement in CONFIG.SYS yourself by editing the file.

EMM386 Weitek Coprocessor Support

You can enable or disable DOS access to the Weitek coprocessor, if fitted on your machine, at the system prompt. Use EMM386 as follows:

EMM386 [/]WEITEK=[ON|OFF]

Optimizing Memory by Editing CONFIG.SYS

The following sections describe ways in which you can edit CONFIG.SYS to optimize memory usage.

If you are editing CONFIG.SYS yourself, ensure that the EMM386 or HIMEM memory manager is loaded before any other device driver that uses extended, high, upper, or expanded memory.

Advanced Memory Manager Options

There are certain EMM386 and HIMEM options that you can only enable by editing the DEVICE statement in CONFIG.SYS yourself. These options are described in the following sections.

Specifying the Chip Set or Memory Type (HIMEM Only)

HIMEM automatically detects the type of chip set on your computer (or EMS or permanent upper RAM). If the chip set or memory type is supported, HIMEM maps Shadow RAM into upper memory accordingly. You can use the CHIPSET option, however, when you experience difficulty mapping Shadow RAM or if you want to prevent mapping. Add the following to the DEVICE statement that loads HIMEM in CONFIG.SYS:

[/]CHIPSET=AUTO|chipset|NONE
AUTO (the default) allows HIMEM to determine the chip set or memory type automatically. NONE disables mapping of Shadow RAM.

You can specify any of the following as chipset:

Value

Explanation

AM286ZX

For Advanced Micro Devices Am286ZX/LX chip set.

EMSALL

For all EMS upper memory, including the page frame. This option disables use of EMS by all other programs.

EMSUMB

For EMS 4.0 or EEMS upper memory blocks. An EMS 4.0 or EEMS memory manager must also be loaded before HIMEM.

HEDAKA

For Ever-Success HEDAKA D60 chipset.

NEAT

For Chips and Technologies NeAT, NeATsx, LeAPSet, or LeAPSetsx chip set.

RAM

For permanent upper RAM. You must also use the /USE option to define the location of the RAM to HIMEM; see "Making an Area of Upper Memory Available (EMM386 and HIMEM)" on page 10-21.

SCAT

For Chips and Technologies SCAT chip set.

Controlling Support for COMPAQ Computers (EMM386 Only)

If you are using a COMPAQ 386 (or later) computer with at least
1 MB of memory, EMM386 automatically enables support to provide an additional 256 KB of extended memory. If you experience problems and want to disable this support, however, add the following option to the EMM386 DEVICE statement in CONFIG.SYS:

[/]COMPAQ=OFF

Setting the Machine Type for GATEA20 (EMM386 Only)

Normally, EMM386 automatically detects your machine type and controls address line A20 accordingly. If necessary, however, you can specify this information by adding the following option to the EMM386 DEVICE statement in CONFIG.SYS:

[/]GATEA20=type
You can specify any of the following as type:

Value

Explanation

AT

Standard AT or compatible.

HP

Hewlett-Packard Vectra.

MCA

Any machine with Micro Channel* Architecture (MCA), or a machine that is compatible with MCA in its method of switching gate A20. Many IBM* PS/2 machines are of this type.

XMS

Any machine with a third-party XMS driver loaded before EMM386 which provides gate A20 switching via the XMS interface.

Making an Area of Upper Memory Available (EMM386 and HIMEM)

You can make specific areas of upper memory available even if the memory manager would normally define them as not usable. Do this by adding the following option to the EMM386 or HIMEM DEVICE statement in CONFIG.SYS, where start is the hexadecimal starting segment address of each memory area and end is the hexadecimal ending segment address:

[/]USE=start-end[,start-end]...]
NOTE: Because USE can map RAM over any hardware or ROM present in the specified memory area, you should not use it unless you are very experienced in allocating upper memory. Also, use conditional statements when you experiment with USE in CONFIG.SYS or have a bootable diskette available containing copies of your original CONFIG.SYS and AUTOEXEC.BAT files, in case you encounter problems.

Specifying Location of the VxD to MS Windows (EMM386 Only)

For MS Windows 3.0 or later in Enhanced mode, you can specify the location of the EMM386 VxD. The default location is the location from which EMM386 is loaded. If you need to specify a different location, add the following option to the EMM386 DEVICE statement in CONFIG.SYS, where path is the VxD location:

[/]VXD=path

Preventing Relocation of the Extended BIOS Data Area (EMM386 and HIMEM)

When you enable the use of spare video memory by applications, the memory manager moves the extended BIOS data area to the bottom of conventional memory. This is because its presence at the top of conventional memory would prevent that being contiguous with video memory. Certain applications, however, are sensitive to relocation of the extended BIOS data area. To prevent relocation, add the following option to the EMM386 or HIMEM DEVICE statement in CONFIG.SYS:

[/]XBDA

Running a Program in Upper Memory

You can load and execute a specified program in upper memory, rather than conventional memory, by using the HIINSTALL or INSTALLHIGH command in CONFIG.SYS. HIINSTALL or INSTALLHIGH performs the same function as HILOAD or LOADHIGH except that it is processed as part of CONFIG.SYS rather than at the system prompt or in a batch file (such as AUTOEXEC.BAT).

The full syntax of the command is as follows:

HIINSTALL|INSTALLHIGH=filespec [options]
You must specify the full filespec of the program you want to load high. You can also specify any parameters (options) that you want to pass to the program.

This program will load and execute in upper memory every time you start the operating system, as long as upper memory is enabled by a memory manager (EMM386 or HIMEM) and is available. Before attempting to load a program into upper memory, you can check to make sure that there is enough upper memory available by running the MEM command; refer to the ``Command Reference'' chapter of DOSBook for information about MEM and its options.

Loading Device Drivers in Upper Memory

You can load an installable device driver into upper memory by replacing the DEVICE command in CONFIG.SYS with a HIDEVICE or DEVICEHIGH command.

The full syntax of the HIDEVICE or DEVICEHIGH command is as follows:

HIDEVICE|DEVICEHIGH [SIZE=nnnn] filespec
You must specify the name of the device driver (filespec) that you want to load high.

If you want to load a device driver that is unable to determine the amount of memory that it will ultimately need, you can also specify the amount of upper memory required for the driver (SIZE=nnnn). To determine this amount, load the driver into conventional memory and then run the MEM command to see how much memory the driver uses. Refer to the ``Command Reference'' chapter of DOSBook for information about MEM and its options.

Additional Tips for Managing Memory

Because DR-DOS is designed to work on any IBM-compatible personal computer and with any software application, there is no single memory configuration that is ideal for all situations. You may need to experiment before memory usage is optimized for your particular software and hardware.

Consider the following issues when you are experimenting with memory.

Disabling Expanded Memory

When you are using applications that do not require expanded memory, make sure that you disable expanded memory emulation when configuring EMM386 so that the page frame in upper memory is not defined. This saves 64 KB of memory. See ``Providing LIM 4.0 EMS Support (EMM386 Only)'' on page 10-11 for information about how to do this. If you are using HIMEM, use the CHIPSET=EMSALL option; see ``Specifying the Chip Set or Memory Type (HIMEM Only)'' on page 10-19 for more information.

Load Order

Load the device drivers and TSRs that occupy the most memory first. The documentation for a device driver or TSR may indicate the amount of RAM it requires. If not, however, you can load the driver or program into conventional memory and then use the MEM command to determine how much memory it uses. Refer to the ``Command Reference'' chapter of DOSBook for a detailed description of the MEM command and its options.

There are some exceptions to loading the largest device drivers and TSRs first; some programs need to be loaded in a particular order. Always read the documentation carefully before you install a device driver or TSR.

Some device drivers and TSRs temporarily require more memory when loading or ``initializing'' than they occupy afterwards. In these cases, the loading order may need to be changed to fit the program into upper memory. If a device driver or TSR does not find the required upper memory, it will automatically be placed in conventional memory. MEM can display the location of each program loaded in conventional and upper memory. Refer to the ``Command Reference'' chapter of DOSBook for a description of MEM.

Add-on Cards

If your computer has add-on cards that use RAM addresses, configure the cards so that the memory addresses used are close together and near the bottom or the top of upper memory. Address a network board, for example, immediately above the video memory area instead of somewhere in the middle of upper memory. Consult the documentation for the card for more information.


[Front] [Prev Chapter] [Next Chapter]

info@caldera.com
Copyright © 1993, 1997, 1998 Caldera, Inc. All rights reserved.