Resolving MS-DOS Out-of-Memory Errors by Tuning BUFFERS and FILES
Resolve MS-DOS 'Out of memory' errors by tuning BUFFERS and FILES in CONFIG.SYS, ensuring sufficient conventional memory remains for drivers and applications.
02 Jun 2026, 03:36 UTC

Preventing MS-DOS Boot Failures via Resource Tuning
If your MS-DOS system fails to load drivers or applications with an 'Out of memory' error, the immediate solution is to reduce the values of BUFFERS and FILES in your CONFIG.SYS file. These settings control resource allocation within the restrictive 640KB conventional memory space.
Mechanism of Resource Allocation
BUFFERS=n allocates n blocks of 512-byte memory used for random Input/Output (I/O) operations. FILES=n sets the absolute maximum number of file handles the operating system can maintain simultaneously. Default settings (e.g., BUFFERS=16, FILES=20 in MS-DOS 6.22) are often too high for memory-constrained systems.
Worked Configuration Example
For a system needing to load drivers using DEVICEHIGH but suffering from memory pressure, a conservative reduction is necessary. Edit CONFIG.SYS (typically in the root directory C:\\):
BUFFERS=8 FILES=16
This configuration reduces conventional memory consumption compared to defaults, balancing I/O needs against the necessity of space for DOS and TSRs (Term Stay Residents).
Practical Verification and Limits
After saving CONFIG.SYS, reboot the system. Run the MEM command in COMMAND.COM. Verify that the 'Conventional memory' free space is sufficient for your running applications. For instance, if MEM reports only 62KB free conventional memory, further reduction of BUFFERS or FILES is required.
A critical limit is that setting BUFFERS excessively high (e.g., 256) can exhaust the 640KB pool, preventing COMMAND.COM from loading entirely. Cross-reference these values against your application's documented requirements; never set them arbitrarily high.
Common Configuration Mistakes
- Insufficient Memory Check: Do not assume high values are always better; excessive allocation guarantees boot failure.
- Ignoring HIGH/DEVICEHIGH: If using
DOS=HIGH, ensure buffer usage does not impede the kernel's ability to map into the Upper Memory Area (UMA). - Verification Failure: Never assume the change took effect; always reboot and run
MEMto confirm the memory state.