When Microsoft was developing Windows 95, developers discovered that SimCity had a severe memory bug that caused it to crash on the new operating system—but instead of forcing the game studio to fix it, Microsoft engineers actually rewrote the core Windows 95 source code to detect if SimCity was running and safely allocate memory for it. - Make Tech Easier
Search
More from us
Must Read<br>In 1977, NASA launched Voyager 1 carrying a map that uses 14 pulsars to pinpoint Earth’s exact position in the Milky Way—a cosmic roadmap designed for curious aliens that some modern astrophysicists, including Stephen Hawking, later argued was a terrifying mistake that we can never take back.<br>Adults who find it physically painful to ask for help, even when they are completely overwhelmed, usually aren’t proud — they are people who realized at an early age that relying on others resulted in disappointment, so they built a hyper-independence to ensure they would never be at the mercy of someone else’s reliability again<br>In 1962, a single missing character in NASA’s guidance software doomed Mariner 1 just minutes after launch — a transcription error so costly that Arthur C. Clarke famously called it "the most expensive hyphen in history"
Somewhere in the source code of Windows 95 — one of the most widely used pieces of software ever released — there is a small block of code whose only job is to ask a single, oddly specific question.
Is the user currently running SimCity?
If the answer is yes, Windows 95 quietly changes how it behaves. It switches its memory handling into a special mode. It does this for one reason: to accommodate a bug. Not a bug in Windows — a bug in SimCity, accidentally left there years earlier by the game’s own programmer.
It is one of the strangest and most revealing decisions in the history of personal computing. And it explains something important about why Windows came to dominate the world.
The bug that wasn’t supposed to matter
The story comes from Joel Spolsky — a former Microsoft programmer, co-founder of Stack Overflow, and one of the most respected writers in software — who heard it directly from the man responsible.
Jon Ross wrote the original Windows version of SimCity, the wildly successful city-building game. And while writing it, Ross made a small mistake. His code, at one point, freed up a chunk of computer memory — handed it back to the system as no longer needed — and then, a moment later, read from that same chunk of memory again.
This is a genuine programming error. It has a name: a “use-after-free” bug. You are not supposed to use memory you’ve already given back. It’s the software equivalent of checking out of a hotel room and then walking back in to use the bathroom.
But here’s the thing. On Windows 3.x — the operating system SimCity was built for — the bug didn’t matter. When SimCity freed that memory, Windows 3.x simply left it sitting there, untouched. So when SimCity mistakenly read it again, the data was still there, exactly as before. The bug was real, but the operating system’s behaviour happened to render it harmless. SimCity shipped, sold over five million copies, and nobody ever knew.
The bug sat quietly inside one of the most popular games in the world, completely invisible, for years.
Then Microsoft built a new operating system.
When SimCity stopped working
Windows 95 was a major leap. It merged the worlds of MS-DOS and Windows, moved from 16-bit to 32-bit software, and overhauled enormous amounts of how the system worked under the hood — including how it managed memory.
And during beta testing, Microsoft’s engineers hit a problem. SimCity — one of the best-selling, most beloved PC games in existence — didn’t work on Windows 95. It crashed.
When they tracked down the cause, they found Jon Ross’s old use-after-free bug. Windows 95 handled freed memory differently from Windows 3.x. When SimCity freed that chunk of memory, Windows 95 was liable to actually reclaim it and reuse it for something else. So when SimCity read from it again, the data was gone or scrambled, and the game fell over.
This put Microsoft in front of a genuine decision. And the decision they made is the interesting part.
Why Microsoft fixed someone else’s bug
The obvious move would have been to pick up the phone, call Maxis — the studio behind SimCity — and tell them to fix their bug and ship an update.
Microsoft didn’t do that. Instead, the company’s engineers added code directly into Windows 95 — code that specifically detects when SimCity is running. When it sees the game, Windows 95 switches its memory allocator into a special mode that doesn’t immediately reclaim freed memory. In effect, Windows 95 deliberately recreates the old, “wrong” behaviour of Windows 3.x — but only for SimCity, and only because SimCity needs it.
Microsoft, in other words, chose to bend its...