We sometimes got memory leak problem, and we need to find the leaked memory, Here is a usful tool from MS, UMDH, it is included in WinDBG install package.

  • It need the PDB files to analyse access the symbol table, then a human readable stack can be generated.
  • You need to generated two set of current used memory, and compare the two to have a result.
  • It compares the current used memory, so you can identify the still-in-use memory, That is the memory you stored somewhere, but they will actually never be used again, and should be released.
  • And of cause, it can identify the memory with out a ptr pointing to when comparing.

You should let memory leak a little more to get a clear view of the result.



Here is the steps to use UMDH:

1. Install Windbg, you can get WinDBG from MS site:http://msdn.microsoft.com/en-us/windows/hardware/hh852365

2. Open a Dos Prompt as Administrator and navigate to the installation folder of WinDbg

3. Set Symbol Path as a System Variable

set _NT_SYMBOL_PATH= SRV*C:\websymbols*http://msdl.microsoft.com/download/symbols; c:\xosymbol

4. Download PDB file and copy to the “C:\xosymbol” which is set part of above environment variable “_NT_SYMBOL_PATH”

5. Start collecting stack traces for user-mode allocations, run command:

gflags /i <Your_process_name.exe> +ust

6. Restart your process.

7. Keep it running, wait until it become steady..

8. Collect a baseline snapshot, run command:

umdh -pn:<Your_process_name.exe> -f:c:\1.log

9. Wait until the memory usage of your process exceeds 1GB or more.

10. Generate a new snapshot, run command:

umdh -pn:<Your_process_name.exe> -f:c:\2.log

11. Compare the two snapshots and get the final report from UMDH

umdh -d c:\1.log c:\2.log > c:\result12.log

12. In the result, we can see the stack where the leaked memory is allocated, You got a direct hint to resolve the leak problem.


And
if you need an example, please go to page https://www.hyzblog.com/use-umdh-identify-memory-leak-problem/

Use UMDH to identify memory leak problem的更多相关文章

  1. A Cross-Platform Memory Leak Detector

    Memory leakage has been a permanent annoyance for C/C++ programmers. Under MSVC, one useful feature ...

  2. JavaScript :memory leak [转]

    Memory leak patterns in JavaScript Handling circular references in JavaScript applications Abhijeet ...

  3. Memory leak patterns in JavaScript

    Handling circular references in JavaScript applications Plugging memory leaks in JavaScript is easy ...

  4. 山东省第七届ACM省赛------Memory Leak

    Memory Leak Time Limit: 2000MS Memory limit: 131072K 题目描述 Memory Leak is a well-known kind of bug in ...

  5. Identify Memory Leaks in Visual CPP Applications —— VLD内存泄漏检测工具

    原文地址:http://www.codeproject.com/Articles/1045847/Identify-Memory-Leaks-in-Visual-CPP-Applications 基于 ...

  6. A memory leak issue with WPF Command Binding

    Background In our application, we have a screen which hosts several tabs. In each tab, it contains a ...

  7. Memory Leak Detection in C++

    原文链接:http://www.linuxjournal.com/article/6556?page=0,0 An earlier article [“Memory Leak Detection in ...

  8. [Node.js] Identify memory leaks with nodejs-dashboard

    In this lesson, I introduce a memory leak into our node.js application and show you how to identify ...

  9. malloc(50) 内存泄露 内存溢出 memory leak会最终会导致out of memory

    https://en.wikipedia.org/wiki/Memory_leak In computer science, a memory leak is a type of resource l ...

随机推荐

  1. 当碰到需要调试打包后的js

    在react中经常开发碰到不能热更中进行调试的,如IE之类的 这个时候我们就需要打包才能运行看到效果, 但是往往每次打包都需要很长的时间: 这个时候我们就可以直接找到打包后的文件,直接在改文件中修改: ...

  2. CentOS 6.x 安装vnc

    https://www.cnblogs.com/pipci/p/7833581.html   1.安装vnc server [root@pxe ~]# yum install tigervnc-ser ...

  3. 移动端meta标签设置

    移动端meta标签设置 1.设置当前html文件的字符编码 <meta charset="UTF-8"> 1 2设置浏览器的兼容模式(让IE使用最新的浏览器渲染) &l ...

  4. 2016最新Java学习计划

    一.Java学习路线图 二.Java学习路线图--视频篇 六大阶段 学完后目标 知识点 配套免费资源(视频+笔 记+源码+模板) 密码        第一阶段 Java基础 入门 学习周期: 35天 ...

  5. linux 权限管理命令chmod、文件和目录的权限的意义

    chmod /bin/chmod chmod [{ugoa}{+-=}{rwx}] [文件或目录]chmod [mode=421] [文件或目录]-R 递归修改 只有 root 和 所有者 可以修改一 ...

  6. mac下连接阿里云总是提示密码是吧,permission denied

    早上使用mac连接阿里云服务器 ,总是提示 连接拒绝 之前还是好好的,密码自己有没有改过...     搞了半天,是 没输入用户名.... 上图中 输入 用户 然后输入密码就行了.

  7. 深入理解abstract class和interface

    摘自:http://www.ibm.com/developerworks/cn/java/l-javainterface-abstract/ (如有侵权,请留言,版主将立即删除) abstract c ...

  8. zTree实现权限列表简单实例

    zTree的简单实例 zTree 是一个依靠jQuery 实现的多功能 "树插件".优异的性能.灵活的配置.多种功能的组合是 zTree 最大优点. zTree官网 zTreeAP ...

  9. AWS CSAA -- 03 Identity Access Management IAM

    009 IAM 101 012 IAM Summary 问题汇总: Lab1:对root account进行加固 Lab 2:利用CloudWatch设置BillingAlarm

  10. Oracle EBS 解决OAF黑屏,卡顿,反应慢