DOS Memory Management

Retro PC memory sparks wild '902K' flexes, config wars, and pure nostalgia

TLDR: DOS 2.0 brought proper memory control, carving the PC’s tiny RAM into blocks and checking “M” and “Z” signatures. Comments erupted: one bragged about “902K free,” others cheered XMS/EMS nostalgia and argued what “conventional” meant—proof that early PCs forced clever hacks still adored today.

The OS/2 Museum’s deep dive into DOS memory—those mysterious blocks tagged with “M” and “Z,” and the old-school allocate/free/resize trio—lit up the comment section like a neon arcade. Folks loved hearing that DOS 2.0 finally wrangled RAM into neat blocks, with ALLOC.ASM receipts and the January ’83 manual to prove it. But the community didn’t just nod; they came in hot. One user flexed, claiming “902 KiB of free conventional memory”—cue gasps and side-eyes. The thread split between “No way, conventional tops around 640K” and “Memory Commander sorcery moved the clutter, deal with it.” The nostalgia brigade rolled in loud, waving their AUTOEXEC.BAT and HIMEM.SYS banners, praising XMS (Extended Memory) and EMS (Expanded Memory) like rock stars of the boot menu. Humor flew fast: people joked that “MZ” stands for “Memory Zoo,” ran memes about surviving CONFIG.SYS boss fights, and reenacted the eternal “what even is ‘conventional’” debate. It’s part history lesson, part retro brag-off, and all vibes. Bottom line: DOS’s simple-but-spicy memory story reopened age-old feuds about caps, hacks, and who squeezed the most bytes out of a very small box.

Key Points

  • DOS 1.x lacked explicit memory management and targeted systems with ~64K RAM, while DOS 2.0 added memory management for larger RAM configurations.
  • PC DOS 2.0 introduced ALLOC (48h), DEALLOC (49h), and SETBLOCK (4Ah) functions to allocate, free, and resize memory blocks.
  • DOS memory allocation operates in 16-byte paragraphs due to the 8086 architecture, allowing blocks larger than 64K with 16-bit size fields.
  • Memory blocks are preceded by MCB headers; ‘M’ marks regular blocks and ‘Z’ marks the last block, enabling integrity checks.
  • Ownership of allocated memory is tied to the current process and is released upon process termination; documentation predates a misleading March 1983 source comment.

Hottest takes

"902 KiB of free conventional memory" — burnt-resistor
"AUTOEXEC.BAT & HIMEM.SYS rulers" — KellyCriterion
"XMS, EMS and all that" — KellyCriterion
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.