什么是Windows“用户对象"? [英] What are Windows "USER objects"

查看:219
本文介绍了什么是Windows“用户对象"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在MFC代码中查找一个看起来像资源限制问题的问题.内存和CPU看起来不错.根据任务管理器上的进程选项卡,我们的GDI对象看起来与其他应用程序一致,但是我们的USER对象似乎比其他应用程序大10倍.

I'm trying to track down an issue in our MFC code that looks like a resource limitation issue. Memory and CPU look fine. According to the processes tab on the Task manager our GDI objects look in line with other applications, but our USER objects appear to be a factor of 10 greater then other applications.

什么是用户对象"?限制是什么?

What is a "USER object" and what are the limits?

推荐答案

这是MSDN上的经典"文章:

Here is a "classic" MSDN article: Give Me a Handle, and I'll Show You an Object

上次我跟踪Windows对象泄漏(我怀疑您有泄漏) Process Explorer 很方便(方便吗?).下部窗格可以显示一些已分配的系统对象,此外还可以进行简单的USER,GDI等对象计数.

Last time I was tracking down Windows object leaks (which i suspect you have) Process Explorer was handy (handley?). The lower-pane could show some allocated system objects, plus it could do the simple USER, GDI, etc object counting.

桌面堆 ,这是一个内存池,其中句柄代表实际的东西"(至少是某些句柄,而不是内核句柄).有时分配的句柄不是很多,而是该句柄下的每个 object 正在使用多少内存.您可以调试堆此方式.这是要安装的痛苦.

The desktop heap, which is a pool of memory where the real "stuff" the handle represents lives (at least some handles, not kernel handles at least). It's sometimes not so much how many handles you have allocated but how much memory each object under that handle is using. You can debug the heap this way. It is a pain to install.

这篇关于什么是Windows“用户对象"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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