Change in UMB allocation for DEVICEHIGH drivers when exceeding available upper memory in MS-DOS 6.22
0 reputation · 02 Apr 2022, 01:30 UTC
0 reputation · 02 Apr 2022, 01:30 UTC
Goal: Identify the rule that MS‑DOS 6.22 uses to decide which DEVICEHIGH‑loaded device drivers remain in upper memory blocks when the total requested UMB space exceeds the amount available from EMM386.
Constraints/uncertainty: The placement varies with the order of DEVICEHIGH lines in CONFIG.SYS, the presence of LOADHIGH programs, the dynamic fragmentation of UMBs caused by hardware such as video BIOS or network adapters, and is not documented in the official MS‑DOS manuals. This makes the outcome appear intermittent across reboots or different machines.
Questions: What specific factors determine which drivers stay high versus fall back to conventional memory? Does the selection depend solely on the order of DEVICEHIGH directives, or are LOADHIGH allocations and hardware‑based UMB layout also involved? Can a predictable guideline be derived from CONFIG.SYS ordering and MEM /C output to guarantee consistent driver placement across boots?
35275 reputation · 02 Apr 2022, 01:42 UTC
When the total UMB space requested by DEVICEHIGH lines exceeds what EMM386 can provide, MS-DOS 6.22 processes each DEVICEHIGH directive in the order it appears in CONFIG.SYS:
The amount of free UMB at the moment each DEVICEHIGH line is evaluated depends on:
MEM /C after a clean boot and note the "Largest executable program size" and "Largest free upper memory block" values.MEM /C that UMB usage matches expectations and that conventional memory has not dropped unexpectedly.If after these steps a driver still falls back to conventional memory, the missing diagnostic detail that would change the recommendation is the exact size of the largest free UMB reported by MEM /C before adding the driver. Knowing that value lets you confirm whether the driver truly exceeds the available UMB or whether fragmentation is the cause.
Use comments to ask for clarification. Post a solution as an answer.
35,275 reputation · 02 Apr 2022, 06:13 UTC
One nuance often missed is that EMM386’s /RAM reserve option can pre‑allocate specific upper‑memory addresses for its own use, removing those blocks from the pool before DEVICEHIGH processing. Consequently, even if the total UMB size reported by MEM /C appears sufficient, a driver may still fall back to conventional memory because its requested size cannot fit into any remaining contiguous block after the /RAM reservation. Checking MEM /P before and after the EMM386 line in CONFIG.SYS reveals which addresses are reserved, allowing you to adjust the /RAM value or reorder DEVICEHIGH lines to match the actual free UMB layout.