Windows 7中一个进程的GDI对象的上限是多少? [英] What's the upper limit on GDI objects for one process in Windows 7?

查看:688
本文介绍了Windows 7中一个进程的GDI对象的上限是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

具有一个GDI泄漏的应用程序,该应用程序最终将击中10,000个分配的GDI对象并崩溃.我尝试增加 GDIProcessHandleQuota 到20,000,但是程序达到10,000个对象时仍然崩溃.我们目前正在修补此泄漏,但出于好奇-是否有办法提高单个过程的GDI限制?还是10k是单个应用程序的硬性限制?

Have an application with a GDI leak that will eventually hit 10,000 allocated GDI objects and crash. I tried increasing the GDIProcessHandleQuota to 20,000, but the program still crashed when it reached 10,000 objects. We're currently working on patching this leak, but out of curiosity--is there a way to increase the GDI limit for a single process? Or is 10k an individual application's hard limit?

推荐答案

有一种可能有效的解决方案.我在这里处理了一个行为不当的供应商应用程序,该应用程序分配了大量的GDI对象,并且该解决方案使它在大多数时间都可以工作...

There is a solution that might work. I deal with a misbehaved vendor's app here that allocates tons of GDI objects and this solution allows it to work most of the time...

reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems" /v windows

寻找SharedSection=,它应该是3个数字,以逗号分隔.一次将中间数字增加1024,看看是否能解决您的问题.您正在使用此变量控制桌面堆"的数量,该变量过去使我无法正常运行GDI.

Look for SharedSection= which should be 3 numbers separated by commas. Increase the middle number by 1024 at a time and see if that solves your problem. You are controlling the amount of "desktop heap" with this variable which has in the past allowed me to get a misbehaving GDI running.

请查看 KB184802 ,以获取更多信息.搜索SharedSection以找到页面的相关部分.

Look at KB184802 for a little more info. Search for SharedSection to find the relevant part of the page.

这篇关于Windows 7中一个进程的GDI对象的上限是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆