如何使用umdh.exe检查Windows上的内存泄漏

本文介绍了如何使用用户模式堆转储(UMDH)工具分析Windows进程的内存泄漏。UMDH通过与操作系统配合,定位特定进程中导致内存泄漏的代码段。首先确定泄漏进程,然后配置GFlags,设置符号路径,最后使用UMDH获取内存分配的堆栈跟踪,通过比较两次日志找出内存增长部分,从而定位问题。
摘要由CSDN通过智能技术生成

The user-mode dump heap (UMDH) utility works with the operating system to analyze Windows heap allocations for a specific process. UMDH locates which routine in a specific process is leaking memory.

UMDH is included in Debugging Tools for Windows. For full details, see UMDH.

Preparing to Use UMDH

If you have not already determined which process is leaking memory, do that first. For details, see Using Performance Monitor to Find User-Mode Memory Leaks.

The most important data in the UMDH logs are the stack traces of the heap allocations. To determine whether a process is leaking heap memory, analyze these stack traces.

Before using UMDH to display the stack trace data, you must use GFlags to configure your system properly. GFlags is included in Debugging Tools for Windows.

let's use testApp.exe for demo.

Testapp

  1. Fist compile your testApp on your local machine, the symbol file need to use later.
  2. Use the fol

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值