HN
Today

Why Windows 11 still ships with Windows 95's memory manager hidden inside it

Windows 11 still harbors a relic from its past: a memory manager from Windows 95, preserved for ancient applications. This deep dive into Microsoft's legendary commitment to backward compatibility explains the 'EmulateHeap' shim and its surprising origin. Hacker News delves into the technical archaeology and debates the costs and benefits of such extreme legacy support.

167
Score
106
Comments
#5
Highest Rank
12h
on Front Page
First Seen
Oct 21, 7:00 PM
Last Seen
Oct 22, 6:00 AM
Rank Over Time
14566810161921252829

The Lowdown

It turns out Windows 11 quietly maintains a piece of its heritage from 1995: a version of the Windows 95 memory manager. This isn't a bug, but a deliberate act of backward compatibility, specifically a compatibility fix known as EmulateHeap.

  • The journey began with the original SimCity for Windows 3.x, which contained a use-after-free bug. On Windows 95 betas, SimCity crashed, leading Microsoft to implement a specific hack that ran the game's memory allocator in a special, forgiving mode.
  • While the SimCity fix was unique, other applications also relied on the quirks of Windows 95's heap management. To keep these apps running on newer Windows versions, Microsoft introduced EmulateHeap.
  • EmulateHeap works by redirecting an app's heap calls to a recompiled version of the Windows 95 heap manager source code, effectively providing the old environment to the legacy application.
  • Users can discover EmulateHeap through the Compatibility Administrator, a free tool included in the Windows Assessment and Deployment Kit (ADK), where it's listed among other compatibility fixes.
  • This dedication to compatibility highlights a core Microsoft philosophy, even as the company modernizes other parts of the OS, such as replacing the Windows 95-era Properties dialog, and sometimes drops support for beloved features like 3D Pinball due to cost-benefit analyses.

The Gossip

Compatibility Commendations

Many commenters laud Microsoft's unparalleled dedication to backward compatibility, contrasting it with other platforms like Apple or Google. They highlight the incredible feat of running 30-year-old software and share anecdotes of Microsoft's extreme measures, such as providing app-specific fixes and even 'lying' about the OS version to make obscure programs function. This culture of 'not breaking userspace' is seen as a significant advantage and a core part of Microsoft's DNA, preserving a vast software ecosystem.

Article's Authenticity & Accuracy

A notable portion of the discussion questions the quality and originality of the article itself. Several users suggest it's 'AI slop' or poorly researched content that rehashes information widely available from sources like Raymond Chen's blog. They criticize the author for misunderstanding key historical details, like the scope of Microsoft's compatibility efforts extending far beyond 'just SimCity,' and for producing 'content for the sake of content.'

The Perils of Perpetuating the Past

While many praise backward compatibility, some users raise concerns about its downsides. Arguments are made that maintaining buggy, complex legacy code in the OS prioritizes marketing over security and can lead to performance issues. The discussion extends to the concept of 'implementation becoming the specification' and debates the trade-offs between compatibility and progress. Python's painful 2-to-3 transition and Wayland's development are cited as examples of projects that chose to 'rip the band-aid off' for long-term improvement, contrasting with Microsoft's approach.

Memory Management Musings

The technical nuances of memory management and debugging are explored. Commenters discuss whether memory allocators should be part of the OS or linked into applications, with some arguing for the latter for flexibility. The historical context of debugging tools like Purify and modern 'sanitizers' is brought up, questioning whether such tools existed or were used during the Windows 95 era to catch bugs like SimCity's. The technical details of how applications manage memory within their own address spaces, even with OS-level allocations, are also debated.