Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Memory Mgrs

Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

24

MEMORY MANAGERS

2
SYSTEM DATA AND TROUBLESHOOTING

CONTENTS AT A GLANCE Making the Most of Conventional Memory


Protect the configuration Optimizations for config.sys Optimizations for autoexec.bat Reviewing your results with MEM Mix and match Adjusting the memory environment for DOS programs under Windows 95 Troubleshooting typical optimization problems

Troubleshooting QEMM Troubleshooting HIMEM/EMM386 Troubleshooting 386MAX Further Study

s personal computers broke the 1MB mark, the problem became utilizing memory over 640KB (conventional memory). For application programs to utilize memory beyond 640KB, a memory manager is required to support the physical RAM present in the system and configure the RAM as extended (XMS) or expanded (EMS) memory. In general, memory managers provide a series of crucial services to a modern PC:
s It allows the operating system and applications to access to extended memory (XMS)

over 1MB.
s It allows extended memory (XMS) to simulate expanded memory (EMS), which other-

wise would require specialized hardware support.


803

804

MEMORY MANAGERS

s It locates and frees unused memory in the upper memory area (UMA) to make it avail-

able for use.


s It utilizes the high memory area (HMA)that 64KB segment just above the 1MB

mark.
s It supports the use of shadow RAM, where slower ROM contents are copied to faster

RAM to provide faster system performance.


s It can rearrange the address order of physical memory in the PC so that faster memory

appears in the lower addresses, a technique known as memory sorting.


s It can fill in empty addresses below 640KB with memory contents from extended mem-

ory (XMS) to utilize the entire 640KB at all times, a technique called backfilling. As a consequence of these features, use of memory managers offers some significant advantages for a computer; larger applications (or applications with huge volumes of data) and more sophisticated operating systems can be created; extended memory supports the execution of code beyond 1MB, so programs can be run outside of conventional memory; multiple programs can be loaded into the available RAM space for more effective multitasking; and unused space in the UMA and HMA can be loaded with DOS or real-mode device driversfreeing more conventional memory for DOS applications. The current generation of memory managers also offer a suite of advanced features and conveniences, such as accelerating software loading and execution times, better memory utilization and performance reporting, and more aggressive location of unused memory. Although the current memory managers are compatible with Windows 95, memory managers are not as vital as they once were. Windows 95 now incorporates many of the memory-management functions needed by the PCrelegating MS-DOS and third-party memory managers to DOS platforms or game machines, as well as DOS applications running in a Windows 95 window. Although memory managers are well-developed pieces of software, they are not always as well-behaved as they should be. This chapter presents some tips for optimizing your use of memory, and examines a selection of symptoms and solutions for the three major memory manager families: QEMM, HIMEM/EMM386, and 386MAX.

Making the Most of Conventional Memory


Even under DOS 7.x of Windows 95, DOS applications still depend on an ample amount of conventional memory for proper operation. Freeing conventional memory and loading real-mode drivers and DOS into upper memory are still two key objectives of memory management. The memory-management process usually consists of enabling the memory managers, then rearranging real-mode software in an optimum fashion. Because every PC configuration is different, and can use an incredibly diverse array of software, no single set of rules can ensure optimum memory utilization (even such memory optimizers as DOS MEMMAKER are known to fail under some circumstances). As a consequence, optimizing a PCs memory is sometimes more of an art than a science. This part of the chapter outlines the essential concepts of using memory managers, and offers some tips to help you utilize memory better.

MAKING THE MOST OF CONVENTIONAL MEMORY

805

PROTECT THE CONFIGURATION


Optimizing memory is largely a matter of tweaking a systems CONFIG.SYS and AUTOEXEC.BAT files. Although Windows 95 tries to eliminate them, these startup files are still the only way to configure a PC for real-mode (DOS) operation. Before you attempt to modify the startup files, you should always make it a point to backup the startup files by copying CONFIG.SYS and AUTOEXEC.BAT to different file names such as:
C:\> copy config.sys config.bak C:\> copy autoexec.bat autoexec.bak

This creates two backup files and allows you to modify the original startup files. If you make a mistake modifying the startup files, you can always restore the original CONFIG.SYS and AUTOEXEC.BAT files by re-copying the backup files to the original file names, such as:
C:\> copy config.bak config.sys C:\> copy autoexec.bak autoexec.bat

2
SYSTEM DATA AND TROUBLESHOOTING

Once the files have been restored, you can resume modifying them. If you have a boot diskette, you should also consider placing a copy of the original startup files on it. Also make it a point to know the <F8> key. When you see the message: Starting Windows 95, press <F8> to load a Startup menu. From here, you can control the ways in which your system starts. This can be a valuable tool when checking to see just which drivers or utilities load (or not). If youre working on an older DOS/Windows 3.1x platform, use the <F5> key to bypass CONFIG.SYS when the Starting MS-DOS message appears, or use <F8> to step through each line in the startup files.

OPTIMIZATIONS FOR CONFIG.SYS


The first step in optimizing your systems memory is to enable your high memory area. To do this, you will need to place HIMEM.SYS and EMM386.EXE into your CONFIG.SYS startup file. From the DOS prompt, start a text editor, such as DOS EDIT, and load your CONFIG.SYS file. One of the first things that CONFIG.SYS should do is load HIMEM and EMM386, as shown in Fig. 24-1 (this is shown as an example onlyyour CONFIG.SYS file might be radically different). Remember that there are a number of command line switches for both HIMEM and EMM386. Depending on the vintage and particular configuration of your PC, you might need to add one or more switches to achieve proper driver operation. Table 24-1 lists the syntax and command line switches for HIMEM, and Table 24-2 lists the syntax and command line switches for EMM386. If you intend to make use of both high memory and any available UMAs, you should use the RAM switch with EMM386. When MEM /C is run with the CONFIG.SYS file shown in Fig. 24-1, only 441KB of the total 640KB conventional memory space is available. Large DOS applications might fail to function with so little conventional memory. Now that you know the high memory is active (thanks to HIMEM and EMM386), you can optimize CONFIG.SYS to free as much conventional memory as possible.

806

MEMORY MANAGERS

device = c:\dos\himem.sys device = c:\dos\setver.exe device = c:\dos\emm386.exe stacks = 9,256 files = 80 buffers = 50 lastdrive = Z device = c:\sb16\drv\sbcd.sys /D:mscd001 /P:220 device = c:\rodent\oldmouse.exe

FIGURE 24-1

A simple, but inefficient, CONFIG.S YS file.

TABLE 24-1 SYNTAX AND COMMAND LINE SWITCHES FOR HIMEM SYNTAX device=[drive:][path]himem.sys [/hmamin=m] [/numhandles=n] [/int15=xxxx] [/machine:g] [/a2Ocontrol:onloff] [/shadowram:onloff] [/cpuclock:on|off]

Parameters
[drive:][path] /hmamin=m Specifies the location of the HIMEM.SYS file. Specifies the amount of memory (in kilobytes) that a program must use before HIMEM.SYS permits the program to use the high-memory area. Valid values for m are 063. The default value is 0. Specifies the maximum number of Extended Memory Block (EMB) handles that can be used simultaneously. Valid values for n are 1128. The default value is 32. Each additional handle requires an additional six bytes of resident memory. Allocates the specified amount of extended memory (in kilobytes) for the Interrupt 15h interface. Some older programs use a conflicting extended memory scheme. To use memory allocated by this switch, programs must recognize VDisk headers. To ensure enough memory is available, add 64 to the value you want to specify for xxxx. Valid values for xxxx are 6465535. If you specify a value less than 64, the value becomes 0. The default value is 0. Specifies the A20 handler to be used. An A20 handler is a part of your computer that gives it access to the high-memory area. The xxxx value can be any of the following codes or their equivalent numbers: Code Number A20 handler at ps2 ptlcascade hpvectra att6300plus acer1100 toshiba wyse tulip zenith at at2 css 1 2 3 4 5 6 7 8 9 10 11 12 12 IBM PC/AT or COMPUADD 386 or JDR 386/33 IBM PS/2 or Datamedia 386/486 or UNISYS PowerPort Phoenix Cascade BIOS HP Vectra (A and A+) AT&T 6300 Plus Acer 1100 Toshiba 1600 and 1200XE or Toshiba 5100 Wyse 12.5MHz i286 or COMPUADD 386 or Hitachi HL500C or Intel 301z or 302 Tulip SX Zenith ZBIOS IBM PC/AT IBM PC/AT (alternative delay) CSS Labs

/numhandles=n

/int15=xxxx

/machine:xxxx

MAKING THE MOST OF CONVENTIONAL MEMORY

807

TABLE 24-1 SYNTAX AND COMMAND LINE SWITCHES FOR HIMEM (CONTINUED) SYNTAX Code Number A20 handler

/a20control:onloff

/shadowram:onloff

/cpuclock:onloff

at3 13 IBM PC/AT (alternative delay) philips 13 Philips fasthp 14 HP Vectra ibm7552 15 IBM 7552 Industrial Computer bullmicral 16 Bull Micral 60 dell 17 Dell XBIOS Specifies whether HIMEM.SYS is to take control of the A20 lineeven if A20 was on when HIMEM.SYS was loaded. If you specify /a20control:off, HIMEM.SYS takes control of the A20 line only if A20 was off when HIMEM.SYS was loaded. The default setting is /a20control:on. Specifies whether HIMEM.SYS is to switch off shadow RAM used for readonly memory, and add that RAM to its memory pool. If your computer has less than 2MB of RAM, the default setting is /shadowram:off. This parameter is supported only on some computers. Specifies whether HIMEM.SYS is to affect the clock speed of your computer. If your computers speed changes when you install HIMEM.SYS, specifying /cpuclock:on might correct the problem. Enabling this switch slows down HIMEM.SYS.

2
SYSTEM DATA AND TROUBLESHOOTING

TABLE 24-2 SYNTAX AND COMMAND LINE SWITCHES FOR EMM386 SYNTAX device=[drive:][path]emm386.exe [on|off|auto] [memory] [w=onlw=off] [mxlframe=addressl/pmmmm] [pn=address] [x=mmmm-nnnn] [i=mmmm-nnnn] [b=address] [L=minXMS] [a=altregs] [h=handles] [d=nnn] [ram] [noems]

Parameters
[drive:l[path] [onlofflauto] Specifies the location of the EMM386.EXE file. Activates the EMM386.EXE device driver (if set to On), or suspends the EMM386.EXE device driver (if set to Off ), or places the EMM386.EXE device driver in auto mode (if set to Auto). Auto mode enables expanded memory support only when a program calls for it. The default value is on. Use the emm386 command to change this value after EMM386 has started. Specifies the amount of memory (in kilobytes) that you want to allocate to EMM386.EXE. Values for memory are 1632768. The default value is 256. EMM386.EXE rounds the value down to the nearest multiple of 16. If you are using expanded memory, this value is in addition to the memory used for low-memory backfilling. Enables or disables support for the Weitek coprocessor. The default setting is w=off.

memory

w=onlw=off

808

MEMORY MANAGERS

TABLE 24-2 SYNTAX AND COMMAND LINE SWITCHES FOR EMM386 (CONTINUED) SYNTAX mx Specifies the address of the page frame. Valid values for x are 114. The following list shows each value and its associated base address in hexadecimal format (values 1014 should be used only on old computers with 512KB of memory): 1 => C000h 8 => DC00h 2 => C400h 9 => E000h 3 => C800h 10 => 8000h 4 => CC00h 11 => 8400h 5 => D000h 12 => 8800h 6 => D400h 13 => 8C00h 7 => D800h 14 => 9000h Specifies the page-frame segment base directly. To specify a specific segment-base address for the page frame, use the frame switch and specify the address you want. Valid values for address are 8000h-9000h and C000h-E000h, in increments of 400h. Specifies the address of the page frame. Valid values for mmmm are 8000h, 9000h, and C000h-E000h, in increments of 400h. Specifies the segment address of a specific page, where n is the number of the page you are specifying and address is the segment address you want. Valid values for n are 0-255. Valid values for address are 8000h-9C00h and C000h-EC00h, in increments of 400h. The addresses for pages 0 through 3 must be contiguous in order to maintain compatibility with version 3.2 of the Lotus/Intel/Microsoft Expanded Memory Specification (LIM EMS). If you use the mx switch, the frame switch, or the /pmmmm switch, you cannot specify the addresses for pages 0 through 3 for the /pmmmm switch. Prevents EMM386.EXE from using a particular range of segment addresses for an EMS page. Valid values for mmmm and nnnn are A000hFFFFh and are rounded down to the nearest 4KB boundary. The x switch takes precedence over the i switch if the two ranges overlap. Specifies a range of segment addresses to be used (included) for an EMS page or for RAM. Valid values for mmmm and nnnn are A000hFFFFh and are rounded down to the nearest 4KB boundary. The x switch takes precedence over the i switch if the two ranges overlap. Specifies the lowest segment address available for EMS banking (swapping of 16KB pages). Valid values are 1000h4000h. The default value is 4000h. Ensures that the specified amount (in kilobytes) of extended memory will still be available after you load EMM386.EXE. The default value is 0. Specifies how many fast alternate register sets (used for multitasking) you want to allocate to EMM386.EXE. Valid values are 0254. The default value is 7. Every alternate register set adds about 200 bytes to the size in memory of EMM386.EXE. Specifies how many handles EMM386.EXE can use. Valid values are 2255. The default value is 64. Specifies how many kilobytes of memory should be reserved for buffered direct memory access (DMA). Discounting floppy-disk DMA, this value should reflect the largest DMA transfer that will occur while EMM386.EXE is active. Valid values for nnn are 16256. The default value is 16. Provides access to both expanded memory and the upper memory area. Provides access to upper memory area, but prevents access to expanded memory.

frame=address

/pmmmm pn=address

x=mmmm-nnnn

i=mmmm-nnnn

b=address L=minXMS a=altregs

h=handles d=nnn

ram noems

MAKING THE MOST OF CONVENTIONAL MEMORY

809

Eliminate or disable unnecessary entries The first and simplest step in freeing

conventional memory is to remove any entries that are no longer being used. For example, when old peripherals are upgraded, the old device driver should be removed and the new one loaded. Look through the CONFIG.SYS file and erase any obsolete entries. Suppose for Fig. 24-1 that the file oldmouse.exe was an old mouse driver that was no longer needed. You can simply erase the entry. If you are not certain whether the entry is needed or not, you can disable the entry (rather than remove it) by adding the term REM before the entry, such as:
REM device = c:\rodent\oldmouse.exe

This effectively REMarks-out the entry. If you find that you need the entry after all, you can remove the REM statement later and re-enable the entry without having to type it in again from scratch (this feature goes a long way toward minimizing typing errors).
Allocate files and buffers sparingly The FILES entry defines how many files MSDOS can have open at one time. The BUFFERS entry sets the number of 500-byte buffers that MS-DOS reserves for data transfer to and from disk. Large numbers of FILES and BUFFERS wastes conventional memory. Be sure that the number of FILES and BUFFERS allocated for your system are sufficient without being excessive. For example, if you have been using a complex application that required 80 files and 50 buffers, but the application has been removed from your system, you can return the number of FILES and buffers to a lower level (60 FILES and 40 BUFFERS are usually typical for most Windows 95-configured systems) like:
files = 60 buffers = 40

2
SYSTEM DATA AND TROUBLESHOOTING

Tighten the LASTDRIVE= entry DOS allows up to 26 letters to be used as logical

drive references. In many cases, the LASTDRIVE= function is set to Z: (as in Fig. 24-1), but the actual last drive to be enabled might only be E:, H:, or K:. Each letter requires about 100 bytes. Use a smaller letter that more closely reflects the true last drive. For this example, you might change the LASTDRIVE reference to M:, such as:
lastdrive = M

Set the stacks properly If you are running DOS only, you can usually remove the in-

terrupt stack reference entirely or set it to 0,0. For Windows and Windows 95 systems, however, the setting of 9,256 is adequate for most systems.
Relocate DOS MS-DOS is one of the largest files to occupy conventional memory, so

one of your priorities in optimizing conventional memory should be to move DOS to either an available part of the upper memory area (UMA), or to the high memory area (HMA) using the dos= command in CONFIG.SYS. Remember that you will first need to load HIMEM in order to load DOS into high memory, and use the RAM switch with EMM386 if you plan to try DOS in the UMA. Be sure the following line is added after the EMM386.EXE entry in CONFIG.SYS:
dos=umb,high

810

MEMORY MANAGERS

device = c:\dos\himem.sys device = c:\dos\emm386.exe ram dos = umb,high stacks = 9,256 files = 60 buffers = 40 lastdrive = M devicehigh = c:\sb16\drv\sbcd.sys /D:mscd001 /P:220 devicehigh = c:\dos\setver.exe

FIGURE 24-2

A reasonably optimized CONFIG.SYS file.

If you do not wish to try putting DOS in the UMA, you can omit the umb portion of the line. Figure 24-2 shows our refined CONFIG.SYS file beginning to take shape.
Make use of DEVICEHIGH The DEVICEHIGH= function allows you to place most device drivers into the UMA where otherwise they would be loaded into conventional memory. There are only a few rules to keep in mind when using DEVICEHIGH. First, you must add the umb reference to the dos= function in order to use DEVICEHIGH at all. Second, you cannot use DEVICEHIGH until your memory managers are loaded, so HIMEM and EMM386 must always be loaded in conventional memory with the ordinary DEVICE function (Fig. 24-2). Third, if you have any DEVICE references placed before your memory managers (such as the SETVER.EXE reference placed before EMM386.EXE in Fig. 24-1), relocate the statement(s) after the memory managers (Fig. 24-2). You can then use the DOS MEM function to check the new amount of free conventional memory. After booting a system using the CONFIG.SYS file of Fig. 24-2, free conventional memory reported by MEM (the Largest executable program size entry) rose to 555KB. For only a few minutes worth of work, the system picked up over 114KB of conventional memory.

OPTIMIZATIONS FOR AUTOEXEC.BAT


Working with the AUTOEXEC.BAT system startup file is a bit easier than dealing with CONFIG.SYS. AUTOEXEC.BAT is used to set system variables and to start any noncrucial device drivers or TSRs (such as mouse drivers and caching programs) that might be needed to streamline the system. Before you attempt to work with the AUTOEXEC.BAT file, remember to make a backup of the original file, just in case you get into trouble. If you need guidance making a backup of AUTOEXEC.BAT, see the section Protect the configuration. Start a text editor and load the AUTOEXEC.BAT file.
Eliminate unnecessary entries This is the most common method of streamlining

an AUTOEXEC file. As applications come and go on your system, you will likely be left with a number of system variables that are no longer used, as well as very long PATH statements that you probably do not need. You might also find obsolete or unused drivers and TSRs in AUTOEXEC.BAT that can be removed without problems. If you are not sure whether an entry can be removed safely, place a REM statement in front of the entry. This effectively REMarks-out (disables) the entry without removing it. If you find that you

MAKING THE MOST OF CONVENTIONAL MEMORY

811

need the entry after all, you can simply remove the REM statement later to re-enable the entry.
Make use of LOADHIGH The LOADHIGH= function is used to load a program into the UMA; otherwise, it would be loaded into conventional memory. As with DEVICEHGH, there are some rules that must be followed in order to use LOADHIGH successfully. The umb reference must be added to the dos= statement in CONFIG.SYS, and the LOADHIGH function can not be used until the memory managers are loaded in CONFIG.SYS. A typical application of LOADHIGH is shown in the sample AUTOEXEC.BAT file of Fig. 24-3. It is important to note that DOS does not report whether a LOADHIGH was successful or not. If a file cannot be loaded into upper memory, it will be loaded into conventional memory. Keep in mind that you can use the letters lh instead of LOADHIGH.

REVIEWING YOUR RESULTS WITH MEM


DOS offers the MEM function, which provides a comprehensive breakdown of memory in the system and how it is used. You can use the MEM function before and after an optimization to see the results of your work. Figure 24-4 illustrates a typical memory report using the /C switch. Because this chapter is primarily concerned with freeing as much conventional memory as possible, you should be most concerned with the third line from the bottom: Largest executable program size. The objective is to make this number as large (as close to 640KB) as possible.

2
SYSTEM DATA AND TROUBLESHOOTING

MIX AND MATCH


Chances are that not all of the drivers or TSRs youve attempted to load high (with DEVICEHIGH or LOADHIGH) will actually fit into the available space in the UMA. The trick to optimizing memory is to fit as much as possible into the UMA. Once you review the status of your memory with MEM (as in Fig. 24-4), you can then return to your text editor and continue tweaking the CONFIG.SYS and AUTOEXEC.BAT files to load other drivers high. For Fig. 24-4, the MEM report indicates that a total of 59KB of Upper memory is available. It also reports that 57KB of that space has been utilized by DOS and other driversspecifically SBDC (a Sound Blaster CD driver), SETVER, and MSCDEX. This leaves only 2KB (1744 bytes) available. If you find a utility in the MEM report that uses less than 1744 bytes, you might also be able to load that driver high, and use the remainder of free upper memory.
set blaster = A220 I5 D1 H5 P330 T6 set sound = c:\sb16 prompt $p$g loadhigh c:\sb16\sb16set /M:220 /VOC:220 /CD:220 /MIDI:220 /LINE:220 /TREBLE:0 loadhigh c:\sb16\sbconfig.exe /S loadhigh c:\sb16\drv\mscdex.exe /D:MSCD001 /V /M:15 loadhigh c:\dos\smartdrv.exe loadhigh c:\mouse\mouse.com loadhigh c:\dos\share.exe /L:100

FIGURE 24-3

A typical AUTOEXEC. BAT file using the LOADHIGH command.

812

MEMORY MANAGERS

Name Total = ------- ------------MSDOS 17149 (17K) HIMEM 1168 (1K) EMM386 4144 (4K) COMMAND 2912 (2K) SMARTDRV 28816 (28K) MOUSE 24560 (24K) SHARE 7648 (7K) SBCD 11584 (11K) SETVER 640 (1K) MSCDEX 46576 (45K) Free 570432 (557K) Memory Summary: Type of Memory --------------Conventional Upper Adapter RAM/ROM Extended (XMS)* --------------Total Memory Total under 1MB

Conventional ---------------17149 (17K) 1168 (1K) 4144 (4K) 2912 (2K) 28816 (28K) 24560 (24K) 7648 (7K) 0 (0K) 0 (0K) 0 (0K) 568688 (555K)

Upper Memory ---------------0 (0K) 0 (0K) 0 (0K) 0 (0K) 0 (0K) 0 (0K) 0 (0K) 11584 (11K) 640 (1K) 46576 (45K) 1744 (2K)

Total = Used + --------------------------655360 (640K) 86672 (85K) 60544 (59K) 58800 (57K) 393216 (384K) 393216 (384K) 15668096 (15310K) 2610048 (2549K) --------------------------16777216 (1638K) 3148736 (3075K) 715904 (699K) 145472 (142K)

Free --------------568688 (555K) 1744 (2K) 0 (0K) 13058048(12752K) --------------13628480(13309K) 570432 (557K)

Total Expanded (EMS) Free Expanded (EMS)*

16056320 (15680K) 13303808 (12992K)

* EMM386 is using XMS memory to simulate EMS memory as needed. Free EMS memory may change as free XMS memory changes. Largest executable program size 568592 Largest free upper memory block 1296 MS-DOS is resident in the high memory area. (555K) (1K)

FIGURE 24-4

A breakdown of memory utilization using the DOS MEM /C function.

ADJUSTING THE MEMORY ENVIRONMENT FOR DOS PROGRAMS UNDER WINDOWS 95


Windows 95 provides the ability to run MS-DOS programs in a DOS window. This requires you to configure a suitable environment for the DOS program. You can modify the DOS environment using the following steps:
1 2 3 4

On the desktop, right-click the MS-DOS icon, then select Properties. Click the Program tab, then click the Advanced button. The Advanced program settings dialog appears (Figure 24-5). Now you can adjust the CONFIG.SYS and AUTOEXEC.BAT attributes that you want to use when running the MS-DOS window.

TROUBLESHOOTING TYPICAL OPTIMIZATION PROBLEMS


In an ideal world, you should be able to load DOS, TSRs, and device drivers into the UMA and high memory without any difficulty. But in the practical PC world, many situations

MAKING THE MOST OF CONVENTIONAL MEMORY

813

can prevent a program from being relocated out of conventional memory. In many cases, the result is harmlessthe program will simply load into conventional memory as it had before. In other cases, however, system operation can be adversely affected when programs are relocated. The following symptoms explain a number of common problems related to memory optimization.
Symptom 24-1. You see an error message from a driver or TSR when attempting to relocate it This is not necessarily a problem. It might simply be that not

enough memory is available in the UMA to handle the program you are trying to relocate. Try re-arranging the order in which the drivers or TSRs are loaded. Also, the available space in the upper memory area will vary, depending on how the PC is configured. A PC with a great many expansion boards and expansion BIOS ROMs might not leave enough upper memory to hold more than a couple of drivers or TSRs. Little else can be done with such a problem.
Symptom 24-2. The system locks up when a program is relocated Not all

2
SYSTEM DATA AND TROUBLESHOOTING

software is suitable for operation in the UMA. Check the screen messages carefully as the PC initializes and attempt to determine the last program to load successfully before a fault occurs. If you can find the fault, it is a simple matter to remove the DEVICEHIGH= statement and replace it with the DEVICE statement. This will load the uncooperative program

FIGURE 24-5

The Advanced Program Settings dialog.

814

MEMORY MANAGERS

in conventional memory. Remember that it might be necessary to boot the system from a backup or alternate boot disk so that you are able to use a text editor to make and save such a correction. If you are unable to determine the point at which the system locks up, start with the last DEVICEHIGH statement in the CONFIG.SYS file and change each one to DEVICE. Reboot the PC after each change is made. The last line to be changed before system operation returns is the problem. You can then leave that line (to load into conventional memory) and return all subsequent lines to the DEVICEHIGH function.
Symptom 24-3. A device driver small enough for the available UMA fails to load there Some device drivers expand when they are loaded into memory. In most

cases, the program will be loaded into conventional memory. You can find the actual amount of space a driver needs by allowing the driver to load into conventional memory, then using the MEM /C command to see the file and its corresponding file sizethis will be the true amount of memory needed by the driver. You can then try loading the driver with DEVICEHIGH using its size= switch.
Symptom 24-4. A program works erratically or improperly when loaded into the UMA Some device drivers simply do not work well (or at all) in the UMA. It

could be that the program needs a certain amount of memory above it or the driver does not recognize addresses in the UMA. In either case, the offending program should be loaded into conventional memory. If the offending program is being loaded from CONFIG.SYS, change its DEVICEHIGH statement to DEVICE. If the problem is occurring in AUTOEXEC.BAT, remove the LOADHIGH (or lh) statement.
Symptom 24-5. Nothing is being loaded into the UMA You can see this by look-

ing at the MEM report. Chances are that you have missed a configuration step, which is preventing your system from using the UMA. Check the following items. First, check CONFIG.SYS to see that the dos=umb or dos=umb,high statement is included after the memory managers are loaded. Second, check that HIMEM and EMM386 are loaded using the DEVICE statement, rather than the DEVICEHIGH statement. HIMEM should be loaded before EMM386. Also see that the EMM386 entry is using the noems or ram switch. This configuration should enable use of the UMA. At this point, simply be sure that you are using DEVICEHIGH statements for any CONFIG.SYS device drivers to be loaded in the UMA, and LOADHIGH statements for any AUTOEXEC.BAT device drivers.

Troubleshooting QEMM
Symptom 24-6. The message appears: Address wrap at xxxx This message is not really an error, but it means that QEMMs SCANMEM feature has detected that your PCs address space is smaller than the 4GB that the processor can address. Symptom 24-7. The error appears: NOUSERAM=xxxxx-yyyyy This error indicates that QEMMs SCANMEM feature does not detect physical memory in the address range xxxxx-yyyyyeven though your systems BIOS has reported enough extended

TROUBLESHOOTING QEMM

815

memory (XMS) to fill these addresses. If you see this message, use your PCs CMOS setup to reconfigure the machine so that the BIOS reports extended memory properly.
Symptom 24-8. The error appears: Invalid USERAM due to memory cache! This error means that QEMMs SCANMEM feature has detected that the

USERAM=xxxxx-yyyyy parameter that it last printed to the display is invalid and should not be used. You should ignore only the last USERAM message printed to the screen previous USERAM messages are valid. This error might occur if an unusual memory cache architecture makes the contents of memory appear to be variable to SCANMEM.
Symptom 24-9. QEMM 8.0x refuses to function properly under Windows 95 on an IBM ThinkPad The problem is with the BIOS on IBM ThinkPads running

Windows 95. Call the IBM BBS at 919-517-0001 to download TPWIN95.EXE. This file explains the solution, and provides a patch for the IBM BIOS problem.
Symptom 24-10. The error appears: QEMM386: Cannot load because there is not enough memory This error message can appear for several different

2
SYSTEM DATA AND TROUBLESHOOTING

reasons, but it often occurs on machines with a total of 1MB of RAM (640K conventional + 384K extended). When QEMM386 starts, it finds all of the memory in your system and puts it into one big pool. Then it checks the parameters that were specified in the QEMM386 command line in the CONFIG.SYS file. If not enough memory is available to provide all of the services requested by the user (as well as those that QEMM386 performs by default), QEMM386 will terminate with this error message. Remove any EXTMEM (EXT) or MEMORY (MEM) parameters that might exist on the QEMM386.SYS command line (these parameters can easily prevent QEMM from loading when set incorrectly). Supply QEMM386 with parameters that will cause it to use less memorythese include NOFILL (NO), NOROM (NR), and MAPS=0. If you have specified the ROM parameter, remove it. Also, you might need to exclude some of your usable high RAM areas. On an EGA/VGA system, try X=B000-B7FF. On a Hercules system, the NV parameter should be sufficient. If your system uses shadow RAM, QEMM386 can usually use it also, so enabling the shadow RAM is a good idea when this message appears. Of course, the preferable solution to this problem is to install more memory in the computer. This allows QEMM386 to perform all of its requested functions, while also providing more expanded memory for applications that need it.
Symptom 24-11. The error appears: QEMM386: Cannot load because the processor is already in Virtual 86 mode The Intel i386 and later processors can

run in one of three different modes: real-mode, protected mode, and virtual 8086 mode. When QEMM386 starts up, its default settings tell it to place the processor in Virtual 86 mode. However, QEMM386 will not load if some other program (i.e., some other memory manager) has already done this. Check to be sure that QEMM386 is the first line in your CONFIG.SYS file. If not, move the QEMM386 command line to the beginning of the CONFIG.SYS file, and see if QEMM386 will load. If QEMM386 still refuses to load (or it was already the first program to load in CONFIG.SYS), then you should check your machines BIOS settings for memory-management features that might have to be disabled.

816

MEMORY MANAGERS

Symptom 24-12. The error appears: QEMM386: Cannot load because an expanded memory manager is already loaded Only one expanded memory

manager can be running on the computer at any given time. When QEMM386 initializes, it checks to see if another expanded memory manager has already been loaded into the system. If it detects the presence of such a memory manager, it will abort with this error message, rather than attempt to install itself. Because QEMM386 is designed to provide all of the features you need in an expanded memory manager, the old expanded memory manager is no longer needed. Check your CONFIG.SYS for another expanded memory manager or place QEMM386 on the first line of the CONFIG.SYS (expanded memory managers tend to have the letters EMM or EMS in their names). If you see a line that appears such as:
DEVICE=C:\DOS\EMM386.EXE DEVICE=C:\REMM.SYS DEVICE=C:\EMM.SYS DEVICE=C:\EMS.SYS DEVICE=C:\CEMM.EXE

remove or REMark-out the line from the CONFIG.SYS file.


Symptom 24-13. The error appears: QEMM386: Unknown Microchannel Adapter ID: XXXX On MicroChannel (MCA) computers, each installed adapter has

its own ID number. This number is a four-digit alphanumeric code (XXXX). When QEMM386 initializes during boot-up, it notes the names of all of the adapters that are present and compares them to a list of adapters contained in its MCA.ADL file. If an adapter is present that is not listed in the MCA.ADL file, QEMM386 will display the error message. Youll need to add the adapter ID information to your existing .ADL file or update the .ADL file by downloading the latest version from Quarterdecks BBS (573-875-0503) or Web site (http://www.quarterdeck.com).
Symptom 24-14. The error appears: QEMM386: Cannot find file MCA.ADL

The QEMM386.SYS device driver is reporting that it cannot find the MCA.ADL file that it uses to determine memory locations used by adapter cards in MicroChannel (MCA) machines. QEMM386.SYS looks for MCA.ADL in the directory from which it was loaded in the CONFIG.SYS file. For example, if your CONFIG.SYS contains a line that reads:
device=c:\qemm\qemm386.sys

QEMM will look in the C:directory for the MCA.ADL file. Ensure that the MCA.ADL file is located in the directory that is specified on the QEMM386.SYS device line in your CONFIG.SYS file.
Symptom 24-15. The error appears: QEMM38452 Cannot load because this is not an 80386 When QEMM386 initializes, it checks the machine to ensure that

a 386/486 processor is present. QEMM386 cannot run on 80286, 8088, or 8086 machines. If QEMM386 displays this error on a 386/486 machine, you should re-install QEMM386. If the message still appears, you should obtain a new copy of QEMM386 and try again. If you have a 386 add-in board, this error message might appear if QEMM386.SYS appears

TROUBLESHOOTING QEMM

817

in the CONFIG.SYS file before the driver for your particular 386 add-in board. Put the add-in boards driver before QEMM386.SYS in the CONFIG.SYS and the problem should go away.
Symptom 24-16. The error appears: QEMM386: Cannot load because there is no room for a page frame To create and utilize expanded memory,

QEMM386 must create a page frame that is 64K in size. By default, QEMM386 attempts to put the page frame between A000h (640K) and F000h (960K). However, some configurations prevent QEMM386 from placing a page frame above A000h by splitting or fragmenting the unused areas above A000h into chunks that are less than 64K in size. If QEMM386 cannot place the page frame above A000h, it will attempt to place it in conventional memory. When it cannot create a page frame at all, QEMM386 will display this error message. Try re-arranging any adapters so that a 64K area above A000h is unused. This might involve changing physical switch settings on the adapters (reconfiguring the adapter ROMs). On PS/2 and other MicroChannel (MCA) machines, this will entail using the reference diskette. If rearranging the adapter locations above A000h is not possible, remove any exclusions (X=xxxx-xxxx) statements that reference areas between 0000h and 9FFFh.
Symptom 24-17. The error appears: QEMM386: Cannot load because QEMM is already loaded QEMM386 is a control programthat is, software

2
SYSTEM DATA AND TROUBLESHOOTING

which oversees virtually all aspects of the computers operation. By definition, only one control program can be in charge of the system at any given time. As a result, QEMM386 cannot be loaded on top of itself. QEMM386 is intelligent enough to detect its own presence while loading. If it sees that it has already been loaded, it will abort with this error message. This error will only result if you have multiple lines in your CONFIG.SYS file that load the QEMM386.SYS device file. By removing all but one of these lines, you should correct the problem.
Symptom 24-18. The error appears: QEMM386: Disabling StealthROM:F because the page frame does not overlap any ROM QEMMs stealth tech-

nology (introduced with QEMM386 version 6.0) effectively hides ROM areas above 640K and allows them to be used as either high RAM or part of the EMS page frame. To use the STEALTHROM:F feature, the page frame must be located atop a stealthed ROM area. By default, QEMM will do its best to place the page frame properly. However, if the page frame has been explicitly set (by using QEMMs FRAME= parameter) at an address that is not occupied by a ROM (or if all ROMS have been excluded with the X= parameter), QEMM will disable ST:F and continue. This might result in an overall reduction of the amount high RAM created by QEMM386. Remove the FRAME= parameter from your QEMM386.SYS command line in your CONFIG.SYS file. If no FRAME= parameters are in the command line, check for exclusions (EXCLUDE= or X= parameters) that might be covering ROM areas. Remove the exclusions and try again.
Symptom 24-19. The error appears: QEMM386: Disabling StealthROM:M because there is no page frame A page frame is required to use the ST:M pa-

818

MEMORY MANAGERS

rameter and take full advantage of QEMMs stealth feature. Check your QEMM386.SYS device line in your CONFIG.SYS file for the following parameters:
FRAME=NONE (or FR=NONE) NOEMS FRAMELENGTH=x (or FL=x)where x is a value less than 4

If your QEMM386.SYS device line contains any of these parameters, Stealth will be automatically disabled. To use Stealth, remove the appropriate parameters, save your changes to CONFIG.SYS, and try again.
Symptom 24-20. The error appears: QEMM386: Disabling stealth because QEMM could not locate the ROM handler for INT xx When using

stealth features, QEMM386 must monitor some interrupts at all times. When these interrupts have been diverted by another program, QEMM386 will disable stealth features. As a result, QEMM386 should usually be loaded on the first line of your machines CONFIG.SYS file. This is practical in the vast majority of system configurations. However, it is sometimes desirable to load other device drivers before QEMM386.SYS. When doing this, some device drivers might make it impossible for stealth to see all of the activity in the machineand problems can result. If possible, place the QEMM386.SYS device line at the beginning of your CONFIG.SYS file. If this is not possible, use HOOKROM.SYS (included with QEMM386 version 6.0 and later). This device driver must be placed at the beginning of the CONFIG.SYS file. HOOKROM.SYS acts as a secretary for QEMM386, noting the state of the machine as CONFIG.SYS is processed, then passing these notes to QEMM386 so that it can operate properly with stealth features active.
Symptom 24-21. The error appears: Cannot load because QEMM is not registered Run the INSTALL program to register The files on the QEMM386

product diskette must be installed by running the INSTALL programthey will not function properly when copied over by the DOS COPY command. Run the INSTALL program from the original QEMM386 product-distribution diskette.
Symptom 24-22. You see the errors: CONTEXTS is no longer a QEMM parameter!, or NAMES is no longer a QEMM parameter! QEMM386 versions

4.23 and earlier featured a CONTEXTS parameter that allowed users to specify the maximum number of mapping contexts that QEMM386 could save at one time. Mapping contexts are now determined by the number of HANDLES provided by QEMM386 (ranging from 16 to 25564 by default). Similarly, it was determined that the function of the NAMES parameter (also from QEMM386 versions 4.23 and earlier), which specified the maximum number of named handles, could be included into the HANDLES parameter. As a result, the CONTEXTS and NAMES parameters were abandoned in QEMM386 version 5.0 and later. Remove the CONTEXTS=xxx and NAMES=xxx parameters from your QEMM386.SYS command line in the CONFIG.SYS file.
Symptom 24-23. The error appears: LOADHI: The high memory chain is corrupted QEMM386 uses a collection of high memory areas called a memory chain

TROUBLESHOOTING QEMM

819

to keep track of the TSRs and device drivers that are loaded high by the LOADHI programs. If the conflict is in high memory, this chain can become corrupted. This error message is usually accompanied by an address (e.g., C800h). You can frequently resolve the conflict with an exclusion on the QEMM386 command line in the CONFIG.SYS file. It is also possible that other drivers or programs that are being loaded in the CONFIG.SYS or AUTOEXEC.BAT might be corrupting the high memory chainin which case you should disable all device drivers or TSRs that arent absolutely vital to your machines operation, then re-enable each lineone at a timerebooting each time you make a change, until the conflicting driver or TSR is discovered.
Symptom 24-24. The error appears: LOADHI: Cannot write to log file

This error usually appears when a copy of the QEMM386.SYS device driver is in the root directory of the hard drive, as well as in the sub-directory. This can cause confusion when loading high. Be sure that QEMM386.SYS is only found in the sub-directory, and that the QEMM386 device line in the CONFIG.SYS file specifically points to that sub-directory such as:
device=c:\qemm\qemm386.sys

2
SYSTEM DATA AND TROUBLESHOOTING

Symptom 24-25. The error appears: Stealth ROM is being disabled because it cannot find ROM handler 05 76 This error indicates a stealth-compati-

bility problem with QEMM 8.0x. To work around this problem, exclude stealth features from the indicated memory area or turn off stealth features entirely.
Symptom 24-26. The system will hang when attempting to use Colorado Tape Backup Some implementations of shadow RAM do not allow QEMM to reclaim

them properly. This can manifest itself in a number of waysincluding the tape backup working perfectly with QEMM 7.0x, but failing with QEMM 7.5x. Add the SH:N switch to the QEMM386.SYS command line in the CONFIG.SYS.
Symptom 24-27. There is no specific error message, but Optimize wont complete You are running Ontracks Disk Manager overlay program with QEMM 8.0x.

To work around this problem, move the DMDRVR.BIN file in CONFIG.SYS so it directly precedes the QEMM386.SYS command line. Optimize should now complete normally.
Symptom 24-28. After Optimize is complete, you see the error: Fixed disk parameter error or BIOS error This type of problem often occurs when us-

ing QEMM 8.0x on Compaq Prolinea 5120 systems. You can usually work around this problem by adding the CF:N and BE:N switches to the QEMM386.SYS command line in your CONFIG.SYS (you can do this using QSETUP), then re-run Optimize.
Symptom 24-29. Optimize wont complete on a PC with a Plextor 6X CDROM and Adaptec 1515 SCSI controller This is a known problem with QEMM

8.0x and the ASPI2DOS.SYS SCSI driver. This adapters drivers will only work with the following configurations: (1) with the ST:M switch, load the ASPI driver after QEMM in this configuration, QEMM will optimize and load the driver high: (2) with the ST:F

820

MEMORY MANAGERS

switch, load the ASPI driver before QEMM with the /u and /p140 switches added to the ASPI2DOS.SYS driver line.
Symptom 24-30. An NEC UltraLite Versa PC suffers Exception 13 errors in the Exxxh range You might also find that Windows 3.1x loads PROGMAN, then

drops back to the C: prompt and hangs up. The problem is caused by a memory conflict, and can usually be corrected by adding an exclusion (X=E000-EFFF) on the QEMM 7.0 command line.
The NEC UltraLite Versa has the video ROM in E000h-E7FFh. It has additional ROM in E800h-EFFFh (power-management code). QEMM detects the video ROM properly and requires no exclusion for it, but QEMM maps over E800h-EFFFh. So, this does require an exclusion if you wish to use the power-management features of the system. Symptom 24-31. A Philips CD Recorder (i.e., CDD200) fails to function if you put the USERAM=1M:32M parameter on the QEMM386.SYS line in CONFIG.SYS You find this problem most readily with Compaq systems. Apparently,

the Corel CD Creator software (provided by Adaptec) is not compatible with Compaqs CPQCFG Plug-and-Play (PnP) configuration manager. You need to turn off the PnP switch on the Adaptec SCSI (AHA1535) board and run the CMOS configuration editor. Youll need to specify the exact parameters (addresses) for your Adaptec SCSI board.
Symptom 24-32. QEMM 8.0x refuses to complete an optimization on a Compaq computer You are possibly having a conflict with some of the built-in Com-

paq BIOS features. Use the following switches in the QEMM command line in CONFIG.SYS to get around the problems:
s CF:Y or :N This enables or disables all three Compaq features: Compaq EGA ROM,

Compaq Half ROM, and Compaq ROM Memory. By default, all are enabled. CF:Y enables all features and CF:N disables all features. s CER:Y or :N This enables or disables Compaq EGA ROM. Disabling this can require 32KB of upper memory addresses on some Compaq computers. However, QEMM cannot be turned off if this feature is enabled. s CHR:Y or :N This enables or disables Compaq Half ROM. Disabling this can require 32KB of upper memory addresses on some Compaq computers. s CRM:Y or :N This enables or disables the Compaq Memory ROM. QEMM cannot be turned off if this feature is enabled.
Symptom 24-33. XtraDrive cannot be installed on the desired drive The error appears: Drive 1 is being controlled by a program that appropriates INT13. This often occurs when using QEMM386 in the stealth mode. Try removing the ST:M or ST:F parameters from the QEMM386 command line, and try to install it again (this only needs to be removed during the installation of XtraDrive). Symptom 24-34. QEMM cannot be installed on a system with XtraDrive

When you install QEMM386 on a system that has XtraDrive already installed, you get a

TROUBLESHOOTING QEMM

821

system lockup or Exception 13 error when you reboot the machine (and the QEMM386 loading process starts). You need to add an exception to the QEMM command line. Simply reboot without QEMM, edit the CONFIG.SYS file and add X=9000-9FFF to the QEMM command line. Save your changes and restart the system again.
Symptom 24-35. The XtraDrive device driver cannot be installed into high RAM This is a known problem with SCSI bus mastering controllers and XtraDrive. Even

with double-buffering, you will not be able to load XtraDrive into high RAM when using a SCSI bus-mastering device. This is not really a QEMM memory-manager issue, but a problem with XtraDrive.
Symptom 24-36. The error appears: This program is attempting to access the disk via the page frame This is often a problem with the EMS XtraDrive

disk cache when using QEMM in the stealth mode. You cannot use the XtraDrive EMS cache with QEMM. You must disable the XtraDrive cache (a DBF=2 parameter will not work on the QEMM command line).
Symptom 24-37. Windows 95 hangs on the opening logo screen or your video display appears distorted This usually happens after installing QEMM 8.0x.

2
SYSTEM DATA AND TROUBLESHOOTING

In virtually all cases, this type of problem is caused by QEMM mapping program memory across some portion of the video memory area. A memory exclusion is required to correct the issue. Start by excluding the address range A000-C7FF. If the problem is solved, you can try reducing the exclude-statement range to further pinpoint the exact video range.
Symptom 24-38. After accepting the Optimize results, the system gets caught in a loop and eventually stops in Windows-protection fault 14 This

kind of problem can occur with QEMM 8.0x, which is Windows 95 compliant. To work around this problem, add SH:N and RH:N switches to the QEMM386.SYS command line in CONFIG.SYS and reboot the system. After rebooting, check the Startup group and remove all programs from the Startup group. Rebooting the system again should now take care of the looping and protection fault.
Symptom 24-39. An error appears: Configuration too large for memory while running Optimize under Windows 95 This also typically occurs with a stan-

dard QEMM installation. Youll need to modify the configuration of your CONFIG.SYS file. Open the CONFIG.SYS file in a text editor and add the following lines to the end of the file:
device=c:\windows\setver.exe device=c:\windows\ifshlp.sys dos=noumb

If you are loading any ASPI drivers (e.g., ASPI2DOS.SYS or ASPI4DOS.SYS) or have a SCSI CD-ROM or SCSI hard disk, add this line also:
device=c:\windows\aspi2hlp.sys

822

MEMORY MANAGERS

Save this modified file, then run the QEMM Optimize feature. If the problem continues, open a DOS prompt and switch to your QEMM directory. Type OPTIMIZE /NH, then select the OPTIMIZE Custom feature (Option F3). At the beginning of the software detection (when it says Starting Windows 95), hit <Shift>+<F8>. Youll be prompted to load each driver. Respond Yes to each line and watch what is loading. Look for any line that begins with the command: DEVICEHIGH=. If you find one, write this line down, and then reboot the system. When you see Starting Windows 95 again, press <Shift>+<F5>. Switch to your QEMM directory and type UNOPT <Enter>. Now edit your CONFIG.SYS file and replace the DEVICEHIGH= with DEVICE= line. Run Optimize again and repeat your search and replace of DEVICEHIGH= lines.
Symptom 24-40. Floppy-drive problems occur after installing QEMM

QEMM is generally regarded as an aggressive memory manager because it can seek out areas of memory that can be utilizedrather than simply use the memory that is readily available. As a result, it is possible that QEMM can impair some system functions under the right conditions (usually from using the stealth or ROM hole-detection features). Start by editing the CONFIG.SYS file and add the XST=F000 switch to the QEMM386.SYS command line. The new command line will appear like:
device=c:\qemm\qemm386.sys ram st:m xst=f000

Save your changes, then reboot the system and test your floppy drive(s). If the problem persists, youll need to troubleshoot the ROM hole. Re-open the CONFIG.SYS file in a text editor and remove the XST switch you added, then add the exclusion: X=F400FFFF such as:
device=c:\qemm\qemm386.sys ram x=f400-ffff

Save your changes, then reboot the system and test your floppy drive(s). Once the problem is fixed, Quarterdeck suggests that you re-Optimize QEMM by typing: C:/Q at the DOS prompt. If the problem persists, chances are that the floppy problem is not because of QEMM. You can test this by rebooting the machine. After the machine beeps, press and hold the <Alt> key. You should see a message telling you to press <Esc> to unload DOSDATA.SYS. Press <Esc>, then immediately press and hold <Alt> key again. You will see a message telling you to press <Esc> to unload QEMM. Press <Esc>. If QDPMI is normally loaded after QEMM, a message will indicate that it cannot load without a memory managerpress any key to bypass this message. LOADHI entries will warn about drivers not loading high (this is normal when testing). Once the system finishes booting, try the floppy drive(s) again. If the problem continues, it is resulting from something other than QEMM. If the problem disappears, you might need to remove QEMM from the system.
Symptom 24-41. Using the RAM parameter with QEMM causes an IBM ThinkPad to hang In most cases, the ThinkPad will hang after 10 to 15 seconds. The

extended BIOS Data Area (XBDA) is a data area normally located at the top of conventional memoryjust below 640KB. This memory is used to hold BIOS-specific information. By default, QEMM will relocate this XBDA, reclaiming the conventional memory it

TROUBLESHOOTING HIMEM/EMM386

823

uses and allowing programs, such as VIDRAM to extend conventional memory past 640K. On the IBM ThinkPad, this relocation can result in a crash when the ThinkPad operating system writes data intended for the XBDA into the wrong place (usually around 10 to 15 seconds after loading QEMM). Add the XBDA:L switch to the QEMM386.SYS command line. This will tell QEMM to move the XBDA to low conventional memory (but demands 1KB of conventional memory).
Symptom 24-42. Problems occur when loading programs high, the system hangs, or there is other odd behavior from TSRs, device drivers, or PC cards This often happens when QEMM is loaded onto an IBM ThinkPad and cannot de-

termine which addresses the ThinkPads PC card(s) are using. Each PC card will demand from 0 to 64KB of upper memory addressing space, which must be excluded from QEMMthere is no guarantee that QEMM can auto-detect the region. Youll need to specifically exclude the upper memory range where the PCMCIA card is mapped. If your PCMCIA card is properly configured, a line should be in your CONFIG.SYS that loads the DICRMU01.SYS driver. This driver is the PC-card resource-map utility, which tells the card what area of memory it is supposed to use. Check that command line for an /MA= parameter. This parameter will be followed by the ranges of memory to exclude with the X= parameter on the QEMM386.SYS line. For example, if your CONFIG.SYS file has a DICRMU01.SYS line with /MA=D000-D3FF, you would need to add X=D000D3FF to the end of your QEMM386.SYS command line in the CONFIG.SYS file.
Symptom 24-43. QEMM generates an Exception 6, 12, or 13 error Generally speaking, an exception error indicates a programming fault that the CPU cannot deal with. An exception error can be caused by a problem with QEMM itself (corruption in the QEMM files) or an application (caused by a software bug or simple incompatibility running under QEMM). Run a virus checker to scan for any possible virus activity on disk or in memory. Run ScanDisk to check and correct any file problems on the disk. Check with the applications maker to see if there are known incompatibilities with QEMM, and if there are any workarounds or patches to the application. Finally, try booting without QEMM or use another memory manager to correct the problem. Symptom 24-44. Systems with Disk Manager fail to Optimize properly

2
SYSTEM DATA AND TROUBLESHOOTING

This often happens with Disk Manager and QEMM 8.00 (dated 11/4/95). Optimize hangs during the software detection phase. With QEMM 8.00, the XBIOS.OVL overlay file could not be loaded high successfully during the Optimize process. This file does not appear in CONFIG.SYS or AUTOEXEC.BATit is loaded automatically and invisibly by Disk Manager at start time. Contact Quarterdeck and obtain the patch for QEMM 8.01. Until you can obtain QEMM 8.01, you might work around the problem using a text editor to add the line: XBIOS to the end of the OPTIMIZE.NOT file in your QEMM directory.

Troubleshooting HIMEM/EMM386
Symptom 24-45. System hangs using HIMEM /TESTMEM The memory test

performed by HIMEM.SYS (version 3.10) might failpossibly causing your system to

824

MEMORY MANAGERS

hang upif your machine uses a hardware cache controller. This is because some hardware cache controllers do not handle 16MB and 32MB memory boundaries well. As a result, the HIMEM.SYS memory test fails. To work around this problem, disable the hardware cache controller in your system or remove the /TESTMEM switch from the HIMEM command line.
Symptom 24-46. A20 gate problems occur when installing HIMEM The se-

lection of A20 gate handlers is accomplished automaticallyHIMEM runs through a series of auto-detection schemes trying to find a match. When a match is found, the particular A20 handler is installed. If no match is found, the default A20 handler is installed. Because of the diverse and non-standard nature of todays PCs, HIMEM auto-detection fails and the default handler is installed. Unfortunately, the default handler might not work too well. In this case, you should use the /A20 switch, along with the corresponding machine designation number (Table 24-1) to select the proper A20 handler for your particular PC.
Symptom 24-47. A general error or system problem occurs with EMM386

In most cases, youll notice that the system or an application will lock up when using EMM386. Table 24-3 lists the version designations for EMM386. Fully reinitialize the system: turn your machine off, then turn it back on (a.k.a. cold boot). When the message Starting MS-DOS appears, press <F8> and elect to start the system interactively. When prompted to load EMM386.EXE, choose N for no. If the problem persists when EMM386.EXE is not loaded, something other than EMM386.EXE is causing the problem. If the problem disappears when EMM386.EXE is not loaded, edit the CONFIG.SYS file as follows using an ASCII text editor:
device=c:\dos\emm386.exe x=a000-f7ff nohi noems novcpi nomovexbda notr

Cold boot the machine again. If the problem still persists, the system might have faulty RAM or might require a special machine switch for HIMEM.SYS. Also, advanced memory-related
TABLE 24-3 VERSION DESIGNATIONS FOR EMM386 MS-DOS VERSION MS-DOS 5.0 MS-DOS 5.00a MS-DOS 6.0 MS-DOS 6.2 MS-DOS 6.21 MS-DOS 6.22 Windows 3.1 Windows 3.11 Windows for Workgroups 3.1 Windows for Workgroups 3.11 Windows 95 EMM386 VERSION 4.20 4.33 4.45 4.48 4.48 4.49 4.44 4.44 4.44 4.48 4.95

TROUBLESHOOTING HIMEM/EMM386

825

CMOS settings (such as shadow RAM) might need to be disabled. The system BIOS might also need to be upgraded. If the problem disappears after loading the modified EMM386 command line, the problem is probably related to some service that EMM386 provides. Try removing the X=A000-F7FF switch. If the problem reappears, EMM386.EXE might be scanning memory too aggressively and configuring upper memory blocks on top of some adapter ROM or RAM. Restore the exclusion, but try narrowing the exclusion range. Try removing the NOHI switch. If the problem reappears, EMM386.EXE might be loading into an occupied UMB. If all such regions are excluded, EMM386.EXE cannot be loaded high on the system and NOHI must be used. Try removing the NOEMS switch. If the problem reappears, EMM386.EXE might be conflicting with some hardware ROM or RAM address in the UMA when attempting to establish an expanded memory (EMS) page frame. If EMS is required to run MS-DOS-based applications, use the parameter FRAME=. The angle brackets should appear in both places>> (where is the defined hexadecimal address) to explicitly specify placement of the EMS page frame in a non-conflicting region. If no applications require EMS, simply continue to use the NOEMS parameter. Next, try removing the NOVCPI switch. The NOVCPI switch disables Virtual Control Program Interface (VCPI) support and can be used only in conjunction with the NOEMS parameter. If the problem reappears, the application might not be fully compatible with the EMM386.EXE VCPI allocation scheme. Either continue using the NOVCPI parameter or do not load EMM386.EXE when using the application. Remove the NOMOVEXBDA switch. Some machines use the last 1KB of conventional memory for an eXtended BIOS Data Area (XBDA). By default, EMM386.EXE remaps this memory area into the UMA instead of conventional memory. If this causes unexpected system behavior, the NOMOVEXBDA parameter must be used. Finally, try removing the NOTR switch. EMM386.EXE has a detection code to search for the presence of a token-ring network adapterthis detection code might cause some computers to hang. The NOTR switch can be used to disable this search.
Symptom 24-48. An error appears: Unable to set page frame base addressEMS unavailable This error message is displayed if EMM386 cannot locate

2
SYSTEM DATA AND TROUBLESHOOTING

a 64KB contiguous hole in the UMA for the EMS page frame. According to the LIM 3.2 specification, a page frame consists of four contiguous 16KB pages, and a LIM provider (EMM386) must set the page frame. According to the LIM 4.0 specification, an EMS provider need not set a 64KB page frame, but it should set a 16KB page at the minimum. Although EMM386 conforms to the LIM 4.0 specification, it does not load as an EMS provider if it cannot find a 64KB contiguous hole that can be used for the page frame. This is because the majority of LIM 3.2 applications assume the existence of a page frame. EMM386 can be forced to load without a LIM 3.2 (64KB) page frame by using the Pn parameters (see Table 24-2). If you force EMM386 to load as a LIM 4.0 provider, do not attempt to run LIM 3.2 applications. The best solution is to free a 64KB block of memory in the UMA so that EMM386 can support LIM 3.2 and higher.
Symptom 24-49. An error appears: Size of expanded memory pool adjusted This message is displayed if EMM386 cannot provide all the EMS memory re-

quested on the command line. For example, if you use the command line:
device=emm386.exe 2048

826

MEMORY MANAGERS

and your computer only has 1024KB of XMS memory, EMM386 displays this error message and provides as much EMS as possible (notice that EMM386 uses some XMS memory for its own code and data, which reduces the amount of XMS memory available for EMS simulation). Little can be done to correct this error, except to reduce the EMS called for on the EMM386 command line or add more physical memory to the PC.
Symptom 24-50. Windows 3.x cannot provide EMS when using the NOEMS switch According to the LIM 4.0 specification, an EMS page can also reside

in conventional memory (0 to 640KB). The EMM386 EMS line starts at 256KB by default. If the NOEMS switch is added to the command line, all the holes in the adapter region A000h-FFFFh are used for UMBs, and EMM386 cannot provide any EMS. If Windows 3.0 is started and an MS-DOS session are started, EMM386 might not be able to provide EMS. If Windows 3.0 is running in 386 Enhanced mode, EMM386 can provide EMS within an MS-DOS session. However, the EMS pages are in conventional memory, which can cause problems because of the behavior of LIM 3.2 applications. In a Windows 3.1 386 Enhanced mode MS-DOS session, EMS is not provided. Your best course here is to remove the NOEMS switch from the EMM386 command line.
Symptom 24-51. EMM386 locks up the computer Although EMM386 is gen-

erally considered to be a basic and robust memory manager, there are some conditions where its use might result in a system crash. The /HIGHSCAN feature cannot be used on some computers. If the EMM386 command line in the CONFIG.SYS file contains the /HIGHSCAN parameter, remove /HIGHSCAN from the command line, save the CONFIG.SYS file, and restart your computer. Next, use excludes to isolate potential EMM386 memory conflicts. EMM386 might have incorrectly identified an area being used by the system as a hole (a region that can be used as a UMB or an EMS page frame). As a result, EMM386 accidentally overwrites a portion of memory that is used by a hardware adapter in your computer. Start by excluding addresses in the range A000-EFFF. EMM386 does not use any part of the excluded region for a UMB or EMS page frame. If the problem disappears, you might be able to identify the correct region(s) with some experimentation. Start by excluding a large region, then reducing the size of the region. For example, start with:
device=emm386.exe noems x=a000-efff

If that works, try narrowing the range to:


device=emm386.exe noems x=c000-dfff

If that works too, try narrowing the range further to:


device=emm386.exe noems x=c800-cfff

Remember that you can use multiple exclusions on the same EMM386 command line, such as:
device=emm386.exe noems x=c000-c7ff x=e000-efff

TROUBLESHOOTING HIMEM/EMM386

827

If the computer has a SCSI disk controller and requires a device driver to operate the SCSI adapter, be sure that the DEVICE= line for the SCSI driver appears before the EMM386 command line. Examples of SCSI device drivers include ASPI4DOS.SYS and USPI14.SYS. If problems continue, try loading the SmartDrive double buffer driver. The driver should appear before the EMM386 command line in CONFIG.SYS. If youre using DOS 6.0 (or later), Windows 3.1 (or later), or Windows for Workgroups, the SmartDrive double buffer driver is loaded from the CONFIG.SYS file, such as:
device=c:\windows\smartdrv.exe /double_buffer

In the AUTOEXEC.BAT file, add a /L to the end of the SMARTDRV.EXE line, such as:
c:\windows\smartdrv.exe /L

If the problems persist, add a plus sign (+) to the end of the double buffer device line:
device=c:\windows\smartdrv.exe /double_buffer+

2
SYSTEM DATA AND TROUBLESHOOTING

If you use the SMARTDRV.SYS driver included with MS-DOS 5.x, the SmartDrive double buffer driver is loaded in the CONFIG.SYS:
device=c:\dos\smartdrv.sys /b+

If the problem with EMM386 continues, experiment with different HIMEM.SYS A20 handlers. This is done using the /MACHINE: switch on the HIMEM.SYS device line (see Table 24-1).
Symptom 24-52. An error appears: Insufficient memory for UMBs or virtual HMA This can often happen when using an AMI or Phoenix BIOS. EMM386

might provide this messageeven though there is more than 384KB of extended memory. To work around this problem, modify your CMOS RAM settings to disable the Fast A20 Gating feature. You might also be able to update your motherboards BIOS. This message might also appear on systems with only 384K of extended memory if MS-DOS is loaded high. The solution is to exclude 64KB from EMM386 in order to accommodate loading MS-DOS high.
An error appears: Unable to create page frame If EMM386 is unable to find 64KB of contiguous memory in the upper memory area, it cannot create an expanded memory page frame. If you dont want expanded memory for your system, you can substitute the NOEMS switch for the RAM switch in your EMM386 command line in CONFIG.SYS. If you do want expanded memory, you can try establishing a page frame in a portion of the upper memory area not normally used by EMM386. You can try putting the page frame in the E000h memory block by modifying the EMM386 command line: Symptom 24-53.
device=c:\dos\emm386 m9 ram

828

MEMORY MANAGERS

Do not try this procedure on an IBM model PS/2 computer. Always remember to backup your existing copy of CONFIG.SYS and AUTOEXEC.BAT (preferably to a bootable floppy disk) before attempting any modifications to your startup file. Symptom 24-54. An error appears: EMM386 Privileged Operation Error #01 The problem is with EMM386 and the AST 386 FastBoard. AST Research has

confirmed that loading EMM386 (MS-DOS 5.0 and later versions) on an AST Premium 286 computer with an AST 386 FastBoard upgrade might cause the error. The AST 386 FastBoard is an 80386 upgrade for AST 80286 motherboards. This error might occur if the 386 FastBoard driver (FB386.SYS) is not loaded before EMM386 in the CONFIG.SYS file. Load the 386 FastBoard device driver (FB386.SYS) before EMM386:
device=c:\fb386.sys device=c:\dos\himem.sys device=c:\dos\emm386.exe

Symptom 24-55. An error appears: EMM386 Not InstalledUnable to set page frame base address This message indicates that EMM386 was unable to find

64KB of contiguous space needed for the expanded memory page frame. When you specify the RAM switch (or no switch at all), EMM386 attempts to create a 64KB page frame in the Upper Memory Area (UMA). The actual amount of extended memory used will be 108KB (64KB + 44KB = 108KB). The extra 44KB is used for tables that EMM386 sets up to emulate expanded memory. This 64KB of space acts as a window into expanded memoryallowing programs to see all the available expanded memory 64KB at a time. Try using the NOEMS switch if expanded memory is not needed. Next, be sure HIMEM is installed above EMM386 in the CONFIG.SYS file (other devices should be loaded after EMM386, except for such drivers as DMDRVR.BIN, EMM.SYS, or ADAPTEC.SYS). If youre not working on an IBM machine, add the following switches to the EMM386 command line in the CONFIG.SYS file:
device=c:\dos\emm386.exe i=e000-efff (m9 or frame=e000) ram

The included E000h-EFFFh memory range is generally not used by non-IBM machines, and including this range can allow you to find 64KB of free contiguous memory. The mx switch also allows you to specify different locations for the page frame to begin (see Table 24-2). For m9, the page frame will attempt to begin at E000h. If the program requiring expanded memory can use the LIM 4.0 specification, then the 64KB page frame can be set non-contiguously. Add the Pn=address parameter to the EMM386 command line in CONFIG.SYS:
device=c:\dos\emm886.exe p0=c800 p1=d400 p2=e000 p3=d000 ram

Symptom 24-56. An AT&T 6386E system hangs with a RAM option in EMM386 An expanded-memory page frame set to DC00h or higher on a AT&T 6386E

causes the system to hang up. For example, the following DEVICE= statement hangs the system:
device=emm386.exe m8 ram

TROUBLESHOOTING 386MAX

829

The AT&T 6386E has a ROM option at address E800h that is used during system operations. Setting a page frame to DC00h or higher overlaps with the ROM option, resulting in a system lockup. Alter the mx switch to start the page frame at an address that avoids the conflict.
Symptom 24-57. A Plus Hardcard II is very slow with EMM386 You might

need to exclude the Hardcard XL BIOS from the EMM386 command line:
device=c:\dos\emm386.exe x=c000-c800

Notice that the exclusion range is only an examplethe exact addresses to exclude will depend on your configuration. If you are not using UMBs, use the frame= parameter to set the address of the page frame so that the page frame will not conflict with the addresses being used by the Hardcard. For example, if the Hardcard is using addresses C000-C800, you might use:
device=c:\dos\emm386.exe frame=d000

2
SYSTEM DATA AND TROUBLESHOOTING

This sets the page frame for the D000-DFFF range of memory.
Symptom 24-58. Exception errors occur with EMM386 This kind of error

means that the CPU has encountered a general-protection violation. Because the EMM386 driver operates the CPU in virtual real mode, the CPU checks for valid memory accesses. If a program tries to access memory that it is not allowed to access, the CPU generates an exception fault error, which is detected by EMM386. In effect, EMM386 is reporting a program error detected by the CPU. In general, this error should not occur on PCs that are 100% IBM compatible. Machines that are not might require an OEM version of EMM386. Table 24-4 is a list of protected-mode exception errors and their names:

Troubleshooting 386MAX
Symptom 24-59. The Qualitas DOSMAX utility doesnt function as expected DOSMAX for Windows wont work if software is loaded at the top of conven-

tional memory (near 640KB). Most resident programs load into the lowest address memory available. If the software loads into the top of low DOS memory, DOSMAX for Windows wont work. Disk-controller software is the most common software that uses memory at the top of low DOS, but CD-ROM device drivers sometimes configure a buffer in this area as well. Certain viruses have also been known to attach themselves to this area of memory. DOSMAX also wont work if the systems Qualitas MAX profile includes the option NOXBIOS (Qualitas MAX is not relocating the extended BIOS into high DOS)DOSMAX is disabled. The extended BIOS normally resides at the top of conventional memory. A problem can also occur if you have a system with less than 640KB base memory. Qualitas MAX backfills this memory to 640KB, but these systems arent compatible with Windows 3.x.

830

MEMORY MANAGERS

TABLE 24-4 PROTECTED MODE EXCEPTION ERRORS FOR EMM386 CODE 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 MEANING Divide error Debugger interrupt Nonmaskable interrupt Breakpoint Overflow interrupt Array-boundary violation Invalid opcode Co-processor not available Double fault Co-processor-segment overrun Invalid task state segment Segment not present Stack exception General-protection violation Page fault Coprocessor error

If youre still having problems with DOSMAX, exit Windows and add the DOSMAXMono=OFF switch to the [Qualitas] section of SYSTEM.INI. Add the line (and the section if it doesnt already exist). Restart Windows and retry DOSMAX. You might also try exiting Windows and editing your 386MAX.PRO fileusing a semicolon, comment-out the VGASWAP and USE=B000-B800 options. Re-run Maximize and see if DOSMAX works properly. If problems persist, check to see that you have the most current version of your video drivers (try the standard VGA drivers that come with Windows).
Symptom 24-60. The error appears: Error 1014: Disk cache or other file I/O software using EMS memory Qualitas MAX has detected EMS memory in use

by a disk cache or other resident file I/O software (the other software might be a disk-compression utility or a network). It is recommended that these programs use extended (XMS) memory when operating in a Windows environment. Check EMS memory usage by typing 386util /e in the Qualitas MAX directory to determine which programs are using EMS memory. If you must run Windows with this type of software, you might override the error message by editing your AUTOEXEC.BAT file and adding the DOS command: SET EMSCACHE=OK.
Symptom 24-61. The error appears: VxD Error: Unable to provide DOSMAX features DOSMAX has detected that your system has less than 640KB of conventional

memory. Because the top of conventional memory does not correspond to the bottom of graphics memory (as it does on a system with 640KB) DOSMAX features are unavailable. Most resident programs load into the lowest address memory available. If the software loads into the top of low DOS memory, DOSMAX for Windows wont work. The most common

TROUBLESHOOTING 386MAX

831

software that loads in this manner is software that is necessary for certain hard-disk controllers and some CD-ROM buffers. The best way to overcome this kind of problem is to bring conventional memory to 640KB or to disable software that loads at the top of DOS memory.
Symptom 24-62. The error appears: VxD Error: Qpopup is not running

The Qualitas MAX device driver will not be able to protect this DOSMAX window from programs attempting to enter graphics mode. QPOPUP.EXE is not loading from the WIN.INI file or the Startup group. Without this file, Qualitas MAX cant protect DOSMAX windows from programs that attempt to enter graphics mode. Check the LOAD= line in the WIN.INI file. You can also try to reinstall DOSMAX by using the DOSMAX entry on the Startup tab of the Toolbox (Windows 95).
Symptom 24-63. The error appears: Error 1021: Qualitas MAX stacks required for DOSMAX support There is a problem with the assignment of stacks in

MAX. Qualitas MAX stacks must be enabled to use the DOSMAX feature. Click Load DOS stacks high on the Startup tab of Toolbox (Windows 95) or remove the STACKS=0 option from the 386MAX.PRO file and reboot your system.
Symptom 24-64. The error appears: Error 1011: Bus master disk subsystem detected that requires Qcache or other compliant disk cache to be loaded Qualitas MAX detected a bus-mastering hard-disk controller that does not sup-

2
SYSTEM DATA AND TROUBLESHOOTING

port VDS. Also, your 386MAX.PRO file might contain the NOSCSI option. In either case, 386MAX.VXD expects to find a VDS-compliant disk cache program in memory. Youll need to update the bus mastering driver.
Symptom 24-65. The error appears: Error 2035: V86 RAM page(s) in use

The error message might also ask you to modify RAM= statement(s) in the 386MAX.PRO file to remove one or more memory regions. Windows 95 is attempting to use RAM pages that are already in use by Qualitas MAX. Remove the overlapping portion of the RAM= statement from the 386MAX.PRO file and reboot the system.
Symptom 24-66. The error appears: Error 1020: 386MAX.SYS version mismatch The versions of 386MAX.SYS and 386MAX.VXD that are in use do not

match. Check that the current version of each file is in the Qualitas MAX sub-directory. You might need to reinstall MAX from scratch.
Symptom 24-67. Video problems or conflicts occur while using MAX Common video symptoms include a blank screen on entering or exiting a program, spontaneous system reboots, strange graphics or characters appearing on the screen, or the system hangs after the Qualitas MAX initialization screen. Several regions in the high DOS area have predetermined uses. The first 128KB (between addresses A000h and C000h) is for memory on video boards. Each kind of video display uses a different amount of address space. Just above the video RAM area is a 32KB area (C000h-C800h) for the ROM on many VGA video adapters. In most cases, 386MAX automatically identifies used memory, and does not map into the appropriate video regions of most systems. However, under some circumstances, video cannot be accurately identified.

832

MEMORY MANAGERS

If you experience any odd video symptoms, Qualitas MAX might have re-mapped high DOS memory into a region that the video adapter needs, or might have unsuccessfully relocated the video ROMs via the VGASWAP option. To correct this conflict, disable VGASWAP and USE=B000-B800 in the 386MAX.PRO file. You can do this in Windows 95 by using the UMB/Adapters tab in Toolbox to deactivate use of the Monochrome Display Area (MDA) and VGASWAP. When you make these changes, Toolbox displays a message suggesting that you run Maximize. Choose Exit, then reboot the system to activate your changes, which result in a change to the configuration of high DOS memory. If the problem is resolved, it is important to re-run Maximize at this time to re-optimize your memory configuration. In a DOS environment, edit the 386MAX.PRO file to make the changes. Use any text editor to look at the profile located in the Qualitas MAX directory (QMAX is the default directory). If there is a USE=B000-B800 or any USE= statement in the B000h range, comment that line out of the profile by placing a semicolon (;) in front of the line. Repeat the process for the keyword VGASWAP. Reboot the system to activate the changes. Again, if the problem is resolved, it is important to re-run Maximize at this time to re-optimize your memory configuration.

Further Study
Thats it for Chapter 24. Be sure to review the glossary and chapter questions on the accompanying CD. If you have access to the Internet, take a look at some of these memorymanager resources: Microsoft (HIMEM and EMM386): http://www.microsoft.com Qualitas (386MAX and BlueMAX): http://www.qualitas.com Quarterdeck (QEMM): http://www.qdeck.com

You might also like