Please note, this page has been archived. Please see the main Airesoft Desktop Heap Monitor page for a tutorial video. Future updates will be posted there
For those who don’t know, Desktop Heap Monitor is a debugging tool that displays the consumption of desktop heaps in the current session. Due to its reliance on undocumented internal structures, the increase of the default size of interactive desktop heaps, or maybe just because it’s not an efficient use of time, Microsoft has so far decided not to release an update to the tool to allow it to work on operating systems released after Server 2003. So as I was doing some work in this area, I’ve created an update to let it do just that.
Download my updated package containing the original Microsoft tool and my modifications. When that’s done, extract the files and navigate explorer into the created directory.
If you’re on 64-bit Windows, you can skip to the next paragraph. If not, the first thing to do is go into the x86 directory, right-click the dheapinst.exe file, select the compatibility tab in the popup and turn on compatability mode for Windows Server 2003 (Service Pack 1). Now skip to the installation step.
64-bit users will have to disable driver signature enforcement to load the driver, since it is not digitally signed. You can achieve this by holding F8 during Windows boot and selecting the option from the list. Unfortunately, you’ll have to do this every boot you want to use this version of dheapmon since the setting isn’t persistent. If you have the means and want to sign the driver yourself, go ahead. The comments include a link that tells you how to do this with a test certificate.
The actual installation instructions are exactly the same as they are in the original help file (that’s dheapmon.chm), with one minor exception. Instead of invoking dheapinst.exe directly you must specify dheapinst.com or dheapinst only in order for correct initialization to take place. So to install, fire up an elevated (Administrator) command prompt and type/copy and paste the following:
dheapinst -y srv*http://msdl.microsoft.com/download/symbols
The command will pause for a bit while internal information is downloaded from Microsoft. With that, assuming no errors are reported, setup is complete. If you’re in an investigative mood, the previously mentioned help file will give you other options along with explanations, but that’s strictly optional.
Before a report can be generated, run “dheapmon -l” to ensure the driver is loaded. After this has succeeded, “dheapmon” itself will generate a simple report and “dheapmon -v” will give a more in-depth report.
Some improvements have been made over the original version. The tool now gives reports on all desktops present on the computer regardless of session, rather than just the current session. As it is not uncommon for desktops in different sessions to be similarly named, the session that the desktop belongs to is appended to the name, producing output like the following:
The current session ID is given in the banner so you can easily see which desktops you are interacting with, rather than the ones used by services and other system components.
Removal is achieved by running “dheapinst -r” from an elevated command prompt or by selecting the Desktop Heap Monitor entry from the “Add or Remove programs” control panel.