先安装工具,http://msdn.microsoft.com/en-us/windows/hardware/gg463009.aspx
选择其中的http://msdn.microsoft.com/en-us/windows/hardware/gg463009.aspx
下载安装后,使用umdh工具
运行cmd窗口,将路径设置到安装路径
D:\Program Files\Debugging Tools for Windows (x86)>set _NT_SYMBOL_PATH="%windir%\symbols";D:\AppPath;
D:\Program Files\Debugging Tools for Windows (x86)>gflags -i appname.exe +ust
启动appname.exe
D:\Program Files\Debugging Tools for Windows (x86)>umdh.exe -pn:appname.exe -f:FirstDump.txt
运行appname.exe中相关的各项工作任务
D:\Program Files\Debugging Tools for Windows (x86)>umdh.exe -pn:appname.exe -f:SecondDump.txt
D:\Program Files\Debugging Tools for Windows (x86)>umdh.exe FirstDump.txt SecondDump.txt -f:Result.txt
最后打开result.txt可以看到里面显示了哪里出现了内存泄露
本文详细介绍了如何使用umdh工具来安装、配置和执行应用程序状态检查及内存泄露分析的过程。通过设置环境变量、运行指定命令、保存dump文件并使用umdb进行比较,最终定位到内存泄露的具体位置。

1606

被折叠的 条评论
为什么被折叠?



