Difference between revisions of "DOS memory management"
(created page stub) |
m (→Upper memory) |
||
Line 11: | Line 11: | ||
=== Upper memory === | === Upper memory === | ||
− | The upper memory is all memory between the first 640KB and 1MB. It is normally marked as reserved memory for hardware, but memory management software can determine which parts are actually used and which are not, and enable you to access the unused areas as more-or-less 'normal' RAM. The unused | + | The upper memory is all memory between the first 640KB and 1MB. It is normally marked as reserved memory for hardware, but memory management software can determine which parts are actually used and which are not, and enable you to access the unused areas as more-or-less 'normal' RAM. The unused parts of the upper memory area are referred to as Upper Memory Blocks. |
=== High memory area === | === High memory area === |
Revision as of 07:03, 20 February 2013
With modern operating systems, all memory management you need to do is installing enough RAM. And that's it. The OS determines how to use it, and you usually don't need to worry about it at all. In DOS, this is different. If you have ever tried DOS without paying attention to how your memory is organized, you may have noticed many programs fail to load with an 'Out of memory' error message. Even if you have four gigabytes of it! To use your RAM effectively in DOS you'll need to know how the x86 architecture splits up RAM in separate regions, what these different regions are for, and what you can do with them. Optimizing your system to reserve as much free space as possible for your programs is called memory management.
This page will try to explain, in simple language, all the technical terms you will encounter in DOS memory management, and provide you with practical information to get your favourite games and programs running. If you really want to understand how this all works, see the Wikipedia article on DOS memory management, or use your web search engine of choice.
Contents
Types of memory
Conventional memory
Conventional memory, or base memory, is the most useful type of memory. All programs and TSRs load in conventional memory. Problem is, you only have 640KB of it. (todo: expand)
Upper memory
The upper memory is all memory between the first 640KB and 1MB. It is normally marked as reserved memory for hardware, but memory management software can determine which parts are actually used and which are not, and enable you to access the unused areas as more-or-less 'normal' RAM. The unused parts of the upper memory area are referred to as Upper Memory Blocks.
High memory area
HMA is the first 64KB above the 1MB limit. This can be a bit confusing if you're just getting started in memory management, since the name is similar to upper memory area and is usually referred to in the same context as upper memory. They are in fact separate regions, where the upper memory is below the high memory area. If you really want to know how this became a separate region, use your favourite search engine. All you really need to know is that you can load parts of DOS into it by specifying DOS=HIGH(,UMB) in your config.sys file.
Expanded memory
(todo)
Extended memory
(todo)
Memory management
Getting more conventional memory
The most important and challenging aspect of memory management is to gain more free conventional memory. To do this, you will need to move as many drivers and TSRs as possible to UMBs. However, not all TSRs can load in upper memory, and even if they do they may not work correctly (usually in the form of completely crashing your system without giving any clues to a possible cause). If you notice any instability in your DOS system, try to move TSRs back into conventional memory to find the culprit. You may even need to use different hardware if the drivers for it won't load in upper memory.
(todo: expand)
Software
(todo: list of memory managing software?)