惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
Microsoft Security Blog
Microsoft Security Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Vercel News
Vercel News
Application and Cybersecurity Blog
Application and Cybersecurity Blog
C
Check Point Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
The Hacker News
The Hacker News
L
LINUX DO - 热门话题
T
Tenable Blog
Hugging Face - Blog
Hugging Face - Blog
Google Online Security Blog
Google Online Security Blog
博客园 - Franky
P
Proofpoint News Feed
H
Hacker News: Front Page
P
Privacy & Cybersecurity Law Blog
月光博客
月光博客
P
Proofpoint News Feed
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
The GitHub Blog
The GitHub Blog
云风的 BLOG
云风的 BLOG
博客园_首页
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
CERT Recently Published Vulnerability Notes
Forbes - Security
Forbes - Security
I
InfoQ
Stack Overflow Blog
Stack Overflow Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Attack and Defense Labs
Attack and Defense Labs
N
News and Events Feed by Topic
博客园 - 叶小钗
T
Threat Research - Cisco Blogs
aimingoo的专栏
aimingoo的专栏
D
Darknet – Hacking Tools, Hacker News & Cyber Security
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Hacker News - Newest:
Hacker News - Newest: "LLM"
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 司徒正美
O
OpenAI News
G
Google Developers Blog
Martin Fowler
Martin Fowler
罗磊的独立博客
S
SegmentFault 最新的问题
T
Tor Project blog
量子位

博客园 - lixiong

关于调试,有一个真实的故事我要讲一讲 疑似CPU或者内存故障导致进程崩溃 Web服务的性能,和BCrypt性能问题的解决方法 md5/sha1+salt和Bcrypt 从Win8回顾微软平台的各种技术 为什么EXE不能超过4GB 其实.NET的确慢, 微软推的这一套的确不适合很多地方 微软平台UI自动化(UIA)经验集 今天在InfoQ看到一个google关于test的演讲, 非常精彩 来来来, 我也来发发我大二时候的作品 Windows用户态程序高效排错 全文PDF 回顾下COM+提供的服务,就明白啥是中间层了, 我把绝招贡献给你们吧 招聘职位:赴微软软件测试开发工程师(产品: Windows 7) 《Windows 高效排错》 可以在CSDN读书频道预览了 三个关键命令找出ASP.NET程序内存分片的原因 handle leak ts steps in chinese 一些重要的计数器 IE的leak useful log options in .Net
除了memory leak和handle leak外的其它资源泄露
lixiong · 2006-11-05 · via 博客园 - lixiong

2006-11-05 11:13  lixiong  阅读(3094)  评论()    收藏  举报

除了memory leakhandle外,其它类型的资源泄露还有GDI Leakdesktop heap high usage

关于GDI Leak,可以参考:

Detect and Plug GDI Leaks in Your Code with Two Powerful Tools for Windows XP

http://msdn.microsoft.com/msdnmag/issues/03/01/GDILeaks/default.aspx

Resource Leaks: Detecting, Locating, and Repairing Your Leaky GDI Code

http://msdn.microsoft.com/msdnmag/issues/01/03/leaks/default.aspx

Desktop heap是一类特殊的内存。下面这些kb对此有一些描述:

PRB: User32.dll or Kernel32.dll fails to initialize

http://support.microsoft.com/kb/184802/en-us

"Out of Memory" error message appears when you have a large number of programs running

http://support.microsoft.com/kb/126962/en-us

support.microsoft.com 上搜索desktop heap,可以找到更多的信息。Windows除了使用进程来管理资源外,还是用Sessiondesktop来管理资源。比如只有在同一个Session里面的进程才可以共享剪贴板数据,Windows Message只能在属于同一个desktop的进程之间传递。而desktop heap,是操作系统管理的,为不同session创建的,由同一session内所有desktop共享的内存。当创建进程,创建GUI的时候,都会消耗desktop heap。当Desktop Heap用光后,系统中各种莫名其妙的问题就会发生。比如无法创建新进程,无法弹出菜单,API调用会莫名其妙地出错。

Desktop heap用光的原因往往是太多进程同时运行,或者创建了太多GUI object。怀疑是Desktop heap相关问题的时候,首先可以用下面这篇文章的方法来检查是否Desktop heap用光:

A new System log entry is not generated if the desktop heap is exhausted in Microsoft Windows 2000

http://support.microsoft.com/kb/810807/en-us

如果确认是desktop heap问题后,检察系统是否有太多进程在同时运行,(我曾经见过一百多个dllhost进程同时运行的情况),或者某一程序有特殊的GUI操作。在优化系统,优化代码后,如果的确需要使用很多desktop heap,可以参考前面的kb改变注册表来做调整。

除了上面这些系统资源外,还有其它很多资源都可能出现问题,比如TCP Port用光。

When you try to connect from TCP ports greater than 5000 you receive the error 'WSAENOBUFS (10055)'

http://support.microsoft.com/kb/196271/en-us

如果排错只是按部就班的操作,排错就不是一项有趣的工作了。