About 8 months ago, I got a snazzy new development machine at work. From the get-go, I had a peculiar problem – when I opened a bunch of Internet Explorer windows, my machine started going wonky. Actually, the problem wasn’t caused just by IE, but it seemed like IE triggered it more readily. The issue manifested itself as a progression of increasingly worsening UI problems. The first sign of trouble is that the IE toolbars would rearrange themselves. Specifically, the Links toolbar would move from the bottom of the toolbar stack (where I like it) back to the default location (collapsed, to the right of the address bar). If I kept opening windows, the problem would progress to where new IE windows would display without a menu bar, or would sometimes hang and would need to be killed. If I (foolishly) kept opening windows, things really went haywire. Windows became incapable of popping up any new windows. Context menus wouldn’t display, the Start Menu wouldn’t pop up, grouped start menu items couldn’t be selected, etc. Closing open windows would usually restore the system to some semblance of usability, but I usually ended up rebooting at some point, if only for my peace of mind. Needless to say, this was very frustrating.
Maybe this would all be understandable if I were trying to open 200 IE windows, but I would see it trying to open as few as 10, depending on how many other apps I was running at the time. On a machine with 1GB of memory, this is a pretty absurd limitation. I suspected some sort of resource leak – perhaps some app was exhausting GDI resources. Now, IE does chew up a lot of GDI resources, but according to Task Manager it wasn’t completely out of control. I thought maybe the video driver was the problem, but upgrading to newer versions didn’t help. I even burned down and rebuilt the machine, but still had the problem.
Finally, during my umpteenth round of Googling, I ran across a thread that described a problem very similar to my own. One of the responses in the thread mentions a registry setting that increases the size of the desktop heap. According to a somewhat dated but still relevant MS KB article, “this static value is used to prevent ill- behaved applications from consuming too many resources”. Well, apparently it IE meets the “ill-behaved” criteria, because it seemed to cause Windows to bump into this limit, and Windows wasn’t handling it very gracefully. Anyway, to make a long story longer, when I bumped up the desktop heap size (from its default of 3MB up to 8MB), bingo, all of the problems magically disappeared. Whew, what a relief.
To make this change, navigate regedit to HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\SubSystems. The “Windows” value contains a big honkin’ string, and one part of it is “SharedSection=xxxx,yyyy,zzzz”. The second number (yyyy) is the one that you want to increase. Standard registry editing disclaimers apply, YMMV.