什么是 Windows“用户对象"?

What are Windows quot;USER objectsquot;(什么是 Windows“用户对象?)

本文介绍了什么是 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.

什么是USER 对象",有什么限制?

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 很方便(handley?).下窗格可以显示一些已分配的系统对象,此外它还可以进行简单的 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“用户对象"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:什么是 Windows“用户对象"?

基础教程推荐