

NOVELL TECHNICAL INFORMATION DOCUMENT

DOCUMENT PROCESSING INFO:  Replaces Document FYI-M-1301
TITLE:  BASIC MEMORY OPTIMIZATION
DOCUMENT ID:  TID800073
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 general methods of obtaining the best memory
management possible on a system with DR DOS 6.0 installed.

-----------------------------------------------------------------
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

Because the DR DOS 6.0 operating system has been designed to work with all
IBM-compatible personal computers and software applications, there is no
single perfect memory setup that will optimize memory use for all
situations. Memory optimization will depend both on your particular
hardware setup and the software applications you will be using.  However,
with some trial-and-error system fine tuning, you can optimize DR DOS
memory management to meet your particular needs. What follows are
techniques and suggestions that will help optimize your computer's
software setup.

CHANGING THE ORDER OF MEMORY ALLOCATION

The first step in optimizing the system memory can be as simple as
rearranging the order in which memory blocks are assigned by the
CONFIG.SYS and AUTOEXEC.BAT files.  The general rule is to use upper
memory and high memory as much as possible to free conventional memory for
applications. With this in mind, you should typically use HIBUFFERS and
relocate the DR DOS kernel code to high memory. This is done by using the
/BDOS=FFFF option of the DR DOS memory management drivers (HIDOS.SYS and
EMM386.SYS). If there are any add-on cards that use RAM, make sure that
they are configured so that their RAM is allocated from the beginning or

the end of upper memory.  For example, place a network
card immediately above the video RAM area instead of in the middle of
upper memory.

Device drivers and TSRs can then be loaded into upper memory. For best
memory allocation, those drivers and TSRs that occupy the largest blocks
of memory should be loaded first and contiguously. For example, if there
are three device drivers and two TSR programs that need to be loaded they
should be ordered in descending order in your CONFIG.SYS file largest to
smallest. The documentation for the drivers and TSRs should indicate the
amount of RAM they require.  If the documentation does not indicate their
size, this can be determined by loading the driver or TSR and then using
the MEM /U OR /B command to see a report of memory use.  Chapter 10 of the
DR DOS 6.0 User Guide provides a full
description of the MEM command.   Chapter 12 discusses loading device
drivers
and TSRs.

EXPANDING FILES

If, after determining the size of the drivers and TSRs and loading them
into high memory, a driver or program fails to run properly or produces an
out of memory error message, the problem may be that the driver or TSR is
expanding itself in RAM.  

Some device drivers and TSR's occupy a minimal amount of RAM after they
are loaded into memory, but, while initializing, might actually expand and
take up considerably more RAM than they will ultimately need. Another
method of verifying the program's true RAM size is to load it into
conventional memory, activate the program, and then run the MEM /B command
to see the actual amount of RAM the program occupies. If the program or
driver expands itself in RAM, and you want to load it into upper memory,
you will have to allow sufficient upper memory RAM to accommodate the
initialization size of the program. It might be necessary to use
trial-and-error to determine this size.  

EXAMPLE

Assume the following Device Drivers and TSR's are to be loaded:
Driver #1       =  13Kbyte of RAM
Driver #2       =  10Kbyte of RAM 
Driver #3       =  16Kbyte of RAM 
TSR #1  =  4Kbyte of RAM 
TSR #2  =  6Kbyte of RAM

Using the MemoryMAX HIDEVICE and/or HIINSTALL commands, enter these  lines
in the CONFIG.SYS file:

HIDEVICE = C:\DRIVER#3.SYS      ; which uses 16kb RAM 
HIDEVICE = C:\DRIVER#1.SYS      ; which uses 13kb RAM 
HIDEVICE = C:\DRIVER#2.SYS      ; which uses 10kb RAM 
HIINSTALL = TSR#2               ; which uses 6kb RAM 
HIINSTALL = TSR#1               ; which uses 4kb RAM

NOTE:  There can be exceptions to loading TSRs and drivers in the largest
first system described above. Some device drivers must be loaded in a
specific order. Read the manufacturer's documentation carefully before
installing any driver.

Note that in the above example, the two TSRs can be loaded with the HILOAD
command in the AUTOEXEC.BAT file. For a discussion of the MemoryMAX

HIINSTALL, HIDEVICE, and HILOAD commands, see "MemoryMAX System Commands
and Drivers" on page 4 in the DR DOS 6.0 User Guide. 

LIM Page Frame

Some applications run better with the availability of LIM memory
(sometimes called EMS, or expanded memory). The documentation for each of
your applications will indicate if LIM memory is required.

If the application does not require LIM memory, be sure that no LIM page
frame is defined. This will save 64 Kbytes of upper memory. In the
EMM386.SYS line of your CONFIG.SYS file, disable the page frame with the
switch /F=NONE. If using HIDOS.SYS on a machine with a LIM 4.0 memory
card, the page frame can be disabled by specifying /CHIPSET=EMSALL. 

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