If your program cannot run in DOS because it is too large (more than KB), there are two ways to provide more memory for the program. One way is to use overlay manager ). Overwrite the modules used by hypervisor to manage programs and read them from the disk or delete them from the memory as needed. In this way, even if your program is several megabytes large, it can still run on a computer with only KB of available memory. Some advanced overwrite management programs allow you to "group" the modules that need to be read and deleted at the same time, which helps you to improve its performance by carefully adjusting the program. Some other slightly inferior overwrite management programs do not have this function, so when using them, you cannot adjust the overwrite module through grouping.
Another way to get more available memory is to use the DOS extender, which is a special application, it uses the protection mode of 386,486 or newer models to access up to several megabytes of memory in a flat address space. When your program is connected to the DOS extension, the DOS extension code will become part of the startup code of the program. When your program is executed, the DOS extension is loaded and you have control of the program. All memory allocation calls must be performed through the DOS extension, which skips DOS and the DOS extension allocates more than KB of memory.
Unfortunately, DOS extensions also have some obvious disadvantages. One of them is that when you release your program, most dos extensions require you to pay the run royalty. This may be very expensive, especially when you have many users. There are also a few compiled programs with royalty-free dos extensions, but this is only an exception. Another disadvantage of using DOS extensions is that it usually requires you to use its application programming interface (API) by modifying the source code rather than calling it through DOS ).
Overwrite hypervisor generally does not require running fees, so it has a higher cost-performance ratio and is cheaper than DOS extensions. In addition, when using overwrite hypervisor, you generally do not need to modify the source code. In most cases, overwrite hypervisor is transparent to the program.