How to use UMDH to test memory leak

1.Intall Windows Kits.

note:

  • All options are default, and click finsh to complete the installation.

  • Recommended installation path or sdk version:(some sdk version gflags can not be started )

 

2. Config symble path

  • Add pdb files path("C:\XX\XX") to _NT_SYMBOL_PATH

     

eg: _NT_SYMBOL_PATH="C:\XX\XX"

3.Config gflags

cmd:gflags or double click gflags in "C:\Program Files (x86)\Windows Kits\10\Debuggers\x86"

 

 

4.Set gflags for process, GFlags is most often used to turn on debugging, logging and test features.

gflags -i <ImageFileName> +ust

        -i: operates on settings for a specific image file.

        +ust: create user mode stack trace database.

eg: gflags -i RSLinxNG.exe +ust

5.Use umdh to store current memory status

umdh -pn:<exe name> -f:<SavePath>

eg: umdh -pn:RSLinxNG.exe -f:C:\initialMemory.txt

6.Exercise the program you suspect has a memory leak for a while.

7.Stop your program and use umdh to store current memory status

umdh -pn:<ImageFileName> -f:<SavePath>

eg: umdh -pn:RSLinxNG.exe -f:C:\finalMemory.txt

8.Compare two files

umdh -d <file1 path> <file2Path>  > <resultFilePath>

eg:umdh -d C:\initialMemory.txt c:\finalMemory.txt >comparedResult.txt

9.When we finish test about UMDH, GFlags should be clear; otherwise, it will affect our next performance test.

GFlags –r -ffffffff
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值