4.3 Memory Management
4.3.2 Memory management tools
There are several tools that can be used to manage and optimize system memory. Some of these tools and how they are used are explored in this section:
  • EMM386.EXE – This memory manager emulates expanded memory and makes upper memory available for use by the OS. It can be used as follows: 
    • To add MS-DOS applications needing access to EMS memory, include the statement Device=C: \Windows\Emm386.exe RAM in the Config.sys file. This statement converts XMS memory space to a common pool of XMS/EMS memory available to both Windows 9x and DOS applications. Note that again the DOS=UMB statement will be added by Io.sys to make unused UMBs available to MS-DOS TSRs. 
    • To add MS-DOS TSR utilities into upper memory blocks, include the line Device=C: \Windows\Emm386.exe NOEMS in the Config.sys file. The file Io.sys will add the statement DOS=UMB, to the memory configuration to make UMBs available to MS-DOS Terminate and Stay Resident programs (TSRs). The NOEMS option tells the OS not to convert extended memory to expanded memory. 
  • HIMEM.SYS – Load this device driver to convert memory starting at 1MB available as XMS or extended memory. It is loaded from the config.sys file. The syntax for this command is DEVICE=C:\DOS\HIMEM.SYS.
  • DOS=HIGH – This option is added into Config.sys file to tell the OS to move a portion of itself (such as MS-DOS Kernel) into the high memory area. It is usually combined with DOS=UMB to tell it to create an upper memory block using the syntax DOS=HIGH, UMB.
  • DEVICEHIGH/LOADHIGH – DEVICEHIGH (used in Config.sys) and LOADHIGH (used in Autoexec.bat) both put upper memory blocks to use, once HIMEM.SYS and Emm386.exe have been loaded. To load a mouse driver high, for example, use this syntax: 

    DEVICEHIGH=C: \DOS\MOUSE.SYS

A good system memory tool is MemMaker, included with DOS 6.0. It simplifies the task of placing TSRs into upper memory. This utility will automatically insert the needed entries in the Config.sys and Autoexec.bat files.