Digging The Desktop Heap

Posted by on May 30, 2005 | No Comments

Far from being that pile of icons you keep up in the top lefthand corner, this is a limit imposed by Windows on how many discrete desktop windows you can have open at any one time. It can stop you dead in your tracks if you’re really into a heavy-duty project of some kind that involves running a dozen or more programs at once.

The sneaky thing is, I don’t even know that you’ll get an error message telling you what’s going on. However, I came across this item in Tony Schreiner’s blog that offers a registry hack workaround -

Desktop Heap Limitations
If you have a lot of applications open one thing you might notice is that Windows – even XP – will reach a point where no more windows can be opened. For me, IE hits this point after about 40-50 windows. Depending on what else you have running, you may be able to open more or less.

Usually this is not a problem, but if you find yourself running into this limit the workaround is to increase the Desktop Heap. To do this, edit the following key in the registry:

[HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ SubSystems ]
Windows=”%SystemRoot% \ system32 \ csrss.exe ObjectDirectory= \ Windows SharedSection=1024,3072,512 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=Off MaxRequestThreads=16″

and change 3072 to a larger value such as 4096. Always use caution when editing your registry; standard disclaimers apply.

More information here.

Note: 64-bit versions of Windows have a much larger default desktop heap limit, and you should not hit this issue.