How Windows 98 Managed System and Virtual Memory

Microsoft Windows 98 relied on a hybrid 16-bit and 32-bit memory architecture designed to balance backward compatibility for MS-DOS and Windows 3.1 applications with the modern demands of 32-bit preemptive multitasking. To handle physical RAM and secondary storage, the operating system utilized the Virtual Machine Manager (VMM32) to allocate a 4 GB flat virtual address space per process, backed by demand-paged virtual memory through a dynamic swap file. However, inherent architectural holdovers, such as fixed-size 16-bit resource heaps and caching issues with large amounts of physical RAM, often imposed strict practical limits on overall system stability and performance.

The 4 GB Virtual Address Space

Windows 98 utilized the protected mode capabilities of Intel 80386 and newer processors to provide each 32-bit application with a theoretical 4 GB flat virtual memory space. This 4 GB space was not a uniform block; rather, it was partitioned into four distinct functional zones:

  • 0 MB to 4 MB: Reserved for MS-DOS compatibility, real-mode interrupt vectors, and legacy 16-bit device drivers.
  • 4 MB to 2 GB: Dedicated private address space for user-mode Win32 applications. Each running 32-bit program operated inside its own isolated memory space within this range, preventing individual applications from directly overwriting one another.
  • 2 GB to 3 GB: A shared arena containing 32-bit system components, shared libraries (DLLs), and 16-bit Windows applications. Because all processes shared this range, an errant program could potentially corrupt shared data, causing system-wide instability.
  • 3 GB to 4 GB: Reserved entirely for core operating system services, Ring 0 kernel components, Virtual Device Drivers (VxDs), and hardware-level page tables.

Paging and the Dynamic Swap File

To provide applications with more memory than physically installed on the motherboard, Windows 98 implemented demand paging. Memory was mapped in uniform 4 KB blocks known as pages. When the system ran low on physical RAM, the operating system moved inactive 4 KB memory pages to the hard drive, freeing up physical RAM for the active foreground process.

Unlike earlier iterations of Windows that often required a permanent, fixed-size swap partition, Windows 98 featured a dynamic swap file named WIN386.SWP. Managed automatically by the Virtual Memory Manager:

  • The swap file grew and shrank dynamically according to current application demands and available disk space.
  • Users could override automated sizing via the System Control Panel or SYSTEM.INI to define static minimum and maximum boundaries, which helped reduce hard drive fragmentation.
  • A Least Recently Used (LRU) algorithm determined which memory pages were moved from RAM to disk when physical capacity was reached.

The 16-Bit System Resource Bottleneck

Despite offering a 32-bit virtual memory model for applications, Windows 98 remained constrained by legacy 16-bit core subsystems. The User and GDI (Graphics Device Interface) engines, responsible for rendering windows, menus, fonts, and dialog controls, relied heavily on fixed-size 64 KB memory heaps.

Even if a computer had an abundance of physical RAM and a massive swap file, opening dozens of windows or running graphically complex software would rapidly deplete these 64 KB heaps. Once the "System Resources" meter dropped to critical levels (typically below 10%), the system would report "Out of Memory" errors or freeze entirely, regardless of actual free physical memory.

Physical RAM Limitations and the VCACHE Driver

Windows 98 was engineered for contemporary hardware configurations that typically contained 32 MB to 128 MB of RAM. When installed on computers with larger memory pools, the operating system encountered architectural limitations:

  • The 512 MB VCACHE Issue: The default 32-bit disk caching driver, VCACHE, dynamically consumed virtual address space to cache disk reads and writes. On systems with more than 512 MB of physical RAM, VCACHE could consume all available addresses in the system arena (above 2 GB), leaving no addresses for other critical system drivers and causing out-of-memory errors on startup. This required manual intervention in SYSTEM.INI to cap MaxFileCache.
  • The 1 GB Limit: Windows 98 could not reliably boot or operate with more than 1 GB of physical RAM without third-party patches or limiting the detected memory pool using the MaxPhysPage parameter, as its internal memory structures were not built to track page tables of that scale.