Dh.exe: Display Heap


DH is a command-line tool to display information about heap usage for user-mode processes or pool usage in kernel-mode memory. It also enables you to lock heaps, tags, stacks, and objects. DH accepts command-line switches to identify which process to display information for and what information to display, and writes formatted output to a text file.

One of DH's most useful functions is to display a list of potential memory hogs and memory allocation calls which have allocated the most memory. However, to identify call sites symbolically the system needs the ability to capture a stack back trace at runtime. This is only supported on checked x86 builds.

 

note-icon

Note

Symbols are removed from the standard Windows releases (also known as a retail or 'free' builds) to reduce file size, decrease file load time and increase system performance.

After you've configured your computer, the -g option of DH displays a sorted list of call sites that have allocated the most memory. Each call site is identified by a symbolic stack back trace of up to 16 levels which uniquely identifies the code path that resulted in the memory allocations.

On regular builds of Windows, the -p 0 option displays a list of all Windows kernel objects in the system, along with all handles to those objects for each process. If the -p 0 option is specified, all references to "heap" in the usage text should be replaced by "pool", as DH is really displaying system pool usage information. The same restrictions apply as on checked x86 builds, but you must enable the 'Create Kernel mode stack trace DB' option with Gflags.exe and reboot before the -g option will display useful pool information.

DH Topics

Files Required