TL;DR
This article explains how Windows 1.x and 2.x managed memory using segments and handles, a system rooted in 8086 architecture. The mechanism was complex and not well documented, impacting application stability and performance. Key details about the system’s design and its evolution remain partially unclear.
Recent technical analysis has clarified how 16-bit Windows managed memory through a segment and handle system, a process that was historically poorly documented but critical to application stability and performance.
The core of Windows 1.x and 2.x memory management was based on segments, which are contiguous blocks of memory up to 64KB. Unlike direct physical memory addresses used in simple 8086 programming, Windows used handles—16-bit opaque identifiers—to reference segments, allowing the system to move or discard segments as needed. This approach was inspired by Intel’s protected mode, even though the 8086 hardware did not support it directly.
Application developers interacted with memory primarily through APIs like GlobalAlloc, which returned segment handles, and GlobalLock, which provided a segment address for access. Locking a segment prevented it from being moved, ensuring stable pointers during use, but unlocking allowed the segment to be moved again, complicating memory management. The system’s design aimed to optimize limited physical memory by loading only essential segments while discarding or reloading others on demand.
Why It Matters
This memory management system was fundamental to Windows’ ability to run multiple applications within limited hardware constraints of the era. Understanding its architecture clarifies why early Windows applications experienced stability issues, and it highlights the evolution of memory management from segmented models to modern protected and virtual memory systems. For developers, this knowledge underscores the complexity behind seemingly simple Windows programs of the early 1990s and earlier.

Microprocessor (SE – IV COMP- 210254) – 2021 Edition
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Background
Windows 1.x and 2.x, launched in the mid-1980s, operated on 8086 and 80286 hardware, which lacked native support for protected mode paging. Their memory management relied heavily on segments and handles, a design inspired by Intel’s protected mode but implemented in real mode. The NE (New Executable) format introduced in Windows further supported segment-based loading and reloading, enabling Windows to manage limited memory resources more efficiently. Despite its importance, detailed documentation on this system remained sparse, leading to ongoing confusion among developers.
“A handle is a 16-bit value which should be considered opaque, even if it might actually be a simple index into some table.”
— Steve Wood, Windows 1.0 memory designer
“Windows adopted and extended the NE format to support segment-oriented memory management, allowing segments to be moved or discarded dynamically.”
— Historian of Windows architecture

FreeDOS Kernel: An MS-DOS Emulator for Platform Independence & Embedded System Development
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
What Remains Unclear
Many specifics about how Windows handled segment relocation, the exact structure of handle tables, and the performance implications of this system remain unclear. Additionally, the transition mechanisms from this segmented model to the protected memory models used in later Windows versions are not fully documented or understood.
legacy Windows 1.x memory emulator
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
What’s Next
Further research into Windows 1.x and 2.x source code, if available, or detailed technical documentation could clarify remaining uncertainties. Understanding this system may inform emulation efforts or legacy application support. It is also likely that future analyses will explore how these early mechanisms influenced later Windows memory architectures.

Microsoft Windows Server 2025 Standard Edition 64-bit, Base License, 16 Core – OEM
64 bit | 1 Server with 16 or less processor cores | provides 2 VMs
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Key Questions
How did Windows manage to run multiple applications with limited memory?
Windows used segments and handles to load only necessary parts of applications into memory, moving or discarding segments as needed, which optimized the use of limited RAM.
What is a segment handle in Win16 memory management?
A segment handle is a 16-bit opaque identifier that references a memory segment, allowing Windows to move or discard segments without invalidating references.
Why was this memory management system complex for developers?
Developers had to work with handles and far pointers, locking and unlocking segments, and managing memory explicitly, which was far more complicated than modern memory models.
Did this system influence later Windows memory architectures?
Yes, the segmented approach and handle abstraction laid groundwork for more advanced memory management in protected mode Windows versions.
Source: Hacker News