Detecting Increase in Heap Allocations with UMDH
The user-mode dump heap (UMDH) utility works with the Windows operating system to analyze the heap allocations for a specific process. UMDH utility is used to locate which routine in a specific process is leaking memory.
Prerequisites
- Download and install the UMDH utility for Windows OS. For more information, see Debugging Tools for Windows from Microsoft documentation.
-
Enable "Create user mode stack trace database" with gflags.exe -i bwappnode-umdh.exe +ust command. Get the process name from task manager.
C:\Program Files (x86)\Windows Kits\10\Debuggers\x64>gflags.exe -i bwappnode-umdh.exe +ust Current Registry Settings for bwappnode-umdh.exe executable are: 00001000 ust - Create user mode stack trace database
- Before using UMDH, you must have access to the proper symbols for your application. UMDH uses the symbol path specified by the environment variable _NT_SYMBOL_PATH. Set the variable to a path containing symbols for your application.
If you also include a path to Windows symbols, the analysis is more complete. The syntax for this symbol path is the same as that used by the debugger.
For more information, see Symbol Path for Windows Debugger from Microsoft documentation.
For example, if the symbols for your application are located at C:\MySymbols, then to use the public Microsoft symbol store for your Windows symbols, using C:\MyCache as your downstream store, run the following command to set your symbol path:
C:\Program Files (x86)\Windows Kits\10\Debuggers\x64>set _NT_SYMBOL_PATH=c:\mysymbols;srv*c:\mycache*https://msdl.microsoft.com/download/symbols