Inside Win16 Memory Management: Segments, Handles, and Locks
This article unpacks the complexities of memory management in 16-bit Windows (1.x–3.x), explaining how Microsoft adapted the NE executable format and segment handles to approximate protected-mode behavior on 8086 real-mode systems. It details critical APIs like GlobalAlloc and GlobalLock, the distinction between fixed and movable segments, and why window procedures had to be exported and declared FAR PASCAL. Much of this legacy complexity, rooted in the 8086 and 286 era, persisted even after Windows 3.1 moved exclusively to protected mode.