

NOVELL TECHNICAL INFORMATION DOCUMENT

DOCUMENT PROCESSING INFO:  Replaces Document FYI-M-1300
TITLE:  MEMORY MANAGEMENT OVERVIEW
DOCUMENT ID:  TID800072
DOCUMENT REVISION:  A
DATE:  18AUG94
AUTHOR:  KBANTA;DPARTRID
ALERT STATUS:  Yellow
DISTRIBUTION:  Public
INFORMATION TYPE:  Issue
README FOR:  NA
NOVELL PRODUCT CLASS:

Desktop Products

NOVELL PRODUCT and VERSION:

DR DOS 6.0

CATEGORY:

Memory

ABSTRACT:

This document discusses the need for memory management, the memory
managers provided my DR DOS 6.0, and the types of memory that can be
obtained through those memory managers.

-----------------------------------------------------------------
DISCLAIMER
THE ORIGIN OF THIS INFORMATION MAY BE INTERNAL OR EXTERNAL TO NOVELL. 
NOVELL MAKES EVERY EFFORT WITHIN ITS MEANS TO VERIFY THIS INFORMATION. 
HOWEVER, THE INFORMATION PROVIDED IN THIS DOCUMENT IS FOR YOUR INFORMATION
ONLY.  NOVELL MAKES NO EXPLICIT OR IMPLIED CLAIMS TO THE VALIDITY OF THIS
INFORMATION.
-----------------------------------------------------------------

ISSUE

The purpose of a memory management system is to manage available RAM
(Random Access Memory) thereby maximizing the amount of memory available
to your applications.

When personal computers were first introduced, they operated with as
little as 64 KB (Kilobytes) of RAM.  However, as PC's became more
sophisticated and powerful, so did the application programs that ran on
them.

Today, modern applications frequently require 540 KB of memory, or more,
to load. Ten years ago, that amount of RAM would have seemed vastly
excessive. Although today's computers typically have over 1 MB of
available RAM, only a portion of the first 640 KB are available for DOS
applications.  Device drivers and TSRs (terminate and stay resident
programs) are also typically loaded into this area further reducing the
memory available for an application.Memory management software is designed
to overcome the problem of insufficient conventional memory. The DR DOS
memory management system is called MemoryMAX.  MemoryMAX consists of 3
device drivers and 6 commands that are used for memory management. 
MemoryMax achieves this goal by using certain previously unused areas of

high and lower memory and by remapping extended memory. The exact amount
of additional memory that MemoryMAX provides is dependent on your
particular system's configuration.

The table below lists MemoryMAX drivers and features classified by
hardware configurations.

MEMORYMAX FEATURES AVAILABLE WITH HARDWARE/DEVICE DRIVER COMBINATIONS

Applicable  | Driver    | LIM | DR DOS Kernel     |  XMS | DRDOS
Hardware    |           |     | Kernel Relocation |      | UpperMemory
------------------------------|-------------------|------|-------------
386sx, 386  |EMM386.SYS | YES |     YES           |  YES |  YES
or 486      |           |     |                   |      |
------------|-----------|-----|-------------------|------|-------------
386sx,386,  |HIDOS.SYS  |     |                   |      |
or 486,     |with Third-|  ?  |     YES           |  YES |  N/S
            |Party XMS  |     |                   |      |
            |Memory Mgr |     |                   |      |
------------|-----------|-----|-------------------|------|-------------
IBM PS/2    |EMMXMA.SYS | YES |     N/S           |  N/S |  N/S 
80286 with  |           |     |                   |      |      
IBM XMA card|           |     |                   |      |      
------------|-----------|-----|-------------------|------|-------------
80286 with  | HIDOS.SYS | N/S |     YES           |  YES |  N/S
Extended Mem|           |     |                   |      | 
------------|-----------|-----|-------------------|------|-------------
80286 with  | HIDOS.SYS | N/S |     YES           |  YES |  YES
Mappable    |           |     |                   |      |
Shadow Ram  |           |     |                   |      | 
with Ext    |           |     |                   |      |   
Memory      |           |     |                   |      | 
------------|-----------|-----|-------------------|------|-------------
80286 with  | HIDOS.SYS | N/S |     YES           |  YES |  YES
Mappable    |           |     |                   |      |
Shadow Ram  |           |     |                   |      |
No Extended |           |     |                   |      |
Memory      |           |     |                   |      | 
------------|-----------|-----|-------------------|------|-------------
80286 with  | HIDOS.SYS | N/S |     YES           |  YES |  YES
NeAT, LeAP, |           |     |                   |      | 
or SCAT     |           |     |                   |      | 
------------|-----------|-----|-------------------|------|-------------
80286 with  | HIDOS.SYS | YES |     YES           |  YES |  YES
LIM 4.0     | with third|     |                   |      |
driver and  | party     |     |                   |      |
extended    | driver    |     |                   |      |
memory      |           |     |                   |      |
------------|-----------|-----|-------------------|------|-------------
8088/8086/  | HIDOS.SYS | YES |     YES           |  YES |  YES
80286 with  | with third|     |                   |      |  
LIM 4.0 EMS | party     |     |                   |      |
card and no | LIM 4.0   |     |                   |      |
extended    | driver    |     |                   |      | 
------------|-----------|-----|-------------------|------|-------------
YES = Supported feature
N/S = Unsupported feature
? = This entry depends on the features offered by third-party memory
manager

If upper memory is not supported, HIDEVICE, HIBUFFERS, HIINSTALL, and

HILOAD commands have no effect.  HIDOS=ON/OFF might be supported if the
third-party memory manager allocates XMS upper memory blocks (UMBs).

MEMORYMAX SYSTEM COMMANDS AND DRIVERS

The following is a brief description of the components of the MemoryMAX
memory management system. Refer to Chapter 11 of the DR DOS 6.0 User Guide
for a complete description of each of these features and commands.

EMM386.SYS

EMM386.SYS is a device driver that allows the DR DOS 6.0 operating system
to make better use of the memory available on 386, 386SX, and 486 based
computers. Using EMM386.SYS, you can use LIM 4.0 expanded memory without
the need for special add-on cards.  Relocate the DR DOS operating system
kernel to upper or high memory, and enable upper memory to be used for
TSRs, device drivers and operating system data structures by using the
/AUTOSCAN, /INCLUDE, /EXCLUDE, and /USE options. You can also add up to 96
KB to conventional memory using the /VIDEO option.

HIDOS.SYS

If you have a 286 based computer with extended memory, you can use the
HIDOS.SYS driver to relocate the DR DOS operating system kernel to high
memory (see the /BDOS option). On computers that support Shadow RAM,
HIDOS.SYS relocates the kernel to upper memory, and enables you to load
TSRs, drivers and operating system data structures into upper memory.
Using the /VIDEO option, you can also add up to 96 KB to conventional
memory.

Sample CONFIG.SYS entry:

DEVICE=C:\DRDOS\HIDOS.SYS /BDOS=AUTO

HIDOS.SYS can also work in conjunction with LIM 4.0 expanded memory (EMS)
device drivers to provide upper memory support on 8088/8086/80286
computers. This feature is detailed in the README file or Release Notes.

NOTE:  The HIDOS.SYS driver should not be confused with the
similarly-named DR DOS MemoryMAX "HIDOS = ON/OFF" command (see below). 

EMMXMA.SYS

Use this driver on PS/2 80286 computers with IBM XMA and 100% compatible
memory cards, to convert memory from extended to LIM expanded memory.

Sample CONFIG.SYS entry:

DEVICE=C:\DRDOS\EMMXMA.SYS /FRAME=D000

NOTE:  The EMMXMA.SYS driver can be used only on PS/2 computers, and you
cannot use the EMMXMA.SYS driver with any third-party memory managers
(e.g., the Qualitas 386/MAX, or the Quarterdeck Expanded Memory Manager
386). You can use HIDOS.SYS following EMMXMA.SYS to obtain upper memory
support.

The MemoryMAX commands listed below can be used when upper memory is
supported by loading the EMM386.SYS or HIDOS.SYS drivers in the CONFIG.SYS
file.


HIBUFFERS
Use HIBUFFERS to specify the number of memory buffers that the DR DOS 6.0
operating system uses. HIBUFFERS performs the same function as BUFFERS,
except that HIBUFFERS allocates as many buffers as possible into high
memory rather than conventional memory. The following entry in your
CONFIG.SYS file sets the number of buffers to 20 and forces the DR DOS 6.0
operating system to allocate as many as possible from high memory.    

Sample CONFIG.SYS entry:

HIBUFFERS = 20

HIDEVICE
The HIDEVICE command loads specified device drivers into upper memory. If
the device is unable to load into upper memory using HIDEVICE, it will be
loaded into conventional memory. The following command loads the ANSI.SYS
device driver into upper memory:

HIDEVICE=C:\DRDOS\ANSI.SYS

HIDOS
The HIDOS command relocates as much of the DR DOS operating system data
structures as possible into upper memory. The default is OFF. 

Sample CONFIG.SYS entry:

HIDOS=ON

HIINSTALL
The HIINSTALL command loads specified TSRs into upper memory. If there is
insufficient upper memory for the specified TSR, it is loaded into
conventional memory. Although similar to the HILOAD command (see below),
HIINSTALL must be loaded via the CONFIG.SYS file.  Use HIINSTALL when you
want a TSR permanently loaded at boot time because of best memory
allocation. The following command installs the CURSOR program into upper
memory:

HIINSTALL=C:\DRDOS\CURSOR.EXE

Notice that you must give the full path name to the program and its
extension (.com or .exe).

HILOAD

HILOAD loads specified TSRs and network drivers into upper memory. HILOAD
is similar to the HIINSTALL command (which must be loaded using the
CONFIG.SYS file), but can be executed from the command line, the
autoexec.bat or another batch file.  Before using HILOAD, you must be sure
that upper memory has been enabled with the MEMMAX +U command.  

For example,

C:> HILOAD C:\LAN\NET3

MEMMAX
The MEMMAX command selectively enables and disables those enhanced memory
areas provided by the DR DOS 6.0 operating system that might conflict with
some applications. By using the MEMMAX +V switch, MEMMAX also enables
extra memory (if it has been reserved) in the video adapter area by
EMM386.SYS or HIDOS.SYS. You can execute the MEMMAX command from the
command line or a batch file (see Chapter 10 of the DR DOS 6.0 User
Guide).

NOTE:  If you enabled the video adapter area by using MEMMAX +V, you must
use the MEMMAX -V command to release this memory before loading graphics
applications.

The HIDOS.SYS and EMM386.SYS device drivers can increase the conventional
memory available to applications by using upper memory. However, some
programs fail because they do not expect to find memory in this region.
MEMMAX allows you to selectively enable and disable upper and lower memory
from the command line or from batch files.   MEMMAX +U and -U will enable
and disable upper memory.  The DR DOS 6.0 installation will place the
command "MEMMAX -U > nul" onto the AUTOEXEC.BAT file.  The "> nul"
disables the display of the MEMMAX status message on the screen.

MEMMAX +L and -L will enable and disable the first 64 KB of conventional
memory.  This region is termed "low memory". Usually the operating system
resides in low memory.  By using the DR DOS 6.0 MemoryMAX features, most
of this area can be made available for running applications.  Some
applications were written using packing utilities that become confused
when run in this low memory.  If this happens, the following message
appears:

"Packed file is corrupt".

To correct this situation, use the MEMMAX -L command to disable low memory
before running the application.  After exiting the application, use MEMMAX
+L to enable the low memory area once again.

Sample:
The following example shows how you can use the MEMMAX command in a batch
file that loads network drivers into upper memory. The example assumes
that you have already loaded a DR DOS 6.0 device driver that supports
upper memory.

REM * * * MEMMMAX to open upper memory * * * 
MEMMAX +U 
HILOAD C:\LAN\IPX 
HILOAD C:\LAN\NET3 
REM * * * * Disable lower memory * * *  
MEMMAX -L 
I:
CD LOGIN 
REM * * * * Reopen lower memory * * * * 
MEMMAX +L

-----------------------------------------------------------------
Any trademarks referenced in this document are the property of their
respective owners.  Consult your product manuals for complete trademark
information.
-----------------------------------------------------------------
