....2006....?.....2008.....
....2006....?.....2008.....
原本不想写这方面东西,不过这是个例外。希望这样的标题能很好的描述问题了。
换句话说,就是在IE7打开很多窗口或tab后,有时候会发现系统已经无法创建窗口了。比如IE右键菜单无效,新打开任何图形界面程序均直接退出。原因我以前猜测是达到了win32窗口句柄的上限,导致CreateWindow失败。以前每次出现这样的情况就很无奈的关闭所有IE进程。
这个问题实在是恼人,而且MS也没出过相关的补丁。同时网上也很少有讨论,所以今天在google苦找了一段时间后,终于找到了下面这个帖子,虽然我还没验证是否正确,同时也没找到官方说法。但至少看那帖子的回复以及我的猜测,应该是能解决这个bug了。希望对各位有帮助。
原因是所有Window句柄要占用一个shared 的desktop heap,而IE7估计没有去回收....所以...
解决办法我摘录下来:
To tweak the limit, take a look in the registry at HLKM/System/CurrentControlSet/Control/Session Manager/SubSystems
(cranked up a bit if you find yourself manipulating a lot of desktop objects.)
Within that key is a subkey called Windows, which contains in it, among other things, the value "SharedSection=1024,3072"
Changing the SharedSection entry to "1024,3072,512" (note the comma and the value)increases the size of the "hidden" desktop heap.
If that doesn't work, try increasing the second of the comma delimited values (e.g. 3072 -> 4096) which is the size limit of any particular desktop heap.
Update: just to clarify for some pepole... on vista your default is 1024,3072,512 changing is to 1024,4096,512 will make the difference
同时,正如原文所说的,出了问题别怪任何人