PoolMon Examples |
|
Open Command Prompt |
In this scenario, a memory leak is caused by an application or by a process that allocates memory for use, but does not free it when finished. The result is that available memory is completely used over time, often causing the system to stop functioning properly.
It will probably take a few hours of generating data before you can make a determination about what is causing the problem. Starting your test will cause the counters to jump. It may take a while for the memory pools to reach a steady state.
At the end of this time, you can analyze the tags to see which ones are continuing to increase in size. Stop your test and wait a few hours. See how many of the tag(s) you found that were increasing in size have freed their allocations. The ones that have not been freed, or have continued to increase in size are likely culprits.
The Drsd tag is attached to all allocations made by the Drvalloc() function in the Rasdd.dll and Hprasdd.dll files. All print drivers use this tag for allocating Graphical Device Interface (GDI) objects and memory. If a print driver has an object leak, it can cause the Drsd tag to also leak.
Note
We will use the following steps to identify which driver is triggering the memory leak.
poolmon /iDrsd
The output will look similar to the following:
Memory: 130480K Avail: 91856K PageFlts: 1220 InRam Krnl: 2484K P: 7988K
Commit: 30104K Limit: 248432K Peak: 34028K Pool N: 2224K P: 8004K
Tag Type Allocs Frees Diff Bytes Per Alloc
Drsd Paged 560 ( 177) 539 ( 171) 21 17472 ( 4992) 832
The output will look similar to the following:
Memory: 130480K Avail: 91808K PageFlts: 1240 InRam Krnl: 2488K P: 7996K
Commit: 30152K Limit: 248432K Peak: 34052K Pool N: 2224K P: 8012K
Tag Type Allocs Frees Diff Bytes Per Alloc
Drsd Paged 737 ( 0) 710 ( 0) 27 22464 ( 0) 832
In this example, the diff number is 27, and the number of bytes is now 22464. The difference between the initial and subsequent output means that six Drsd blocks, with a total of 4992 bytes, leaked during the print job. If the diff number had returned to its original value of 21 after the print job, you could interpret such an output to indicate that the driver did not leak.
If Drsd was not the leaking driver, you could perform these steps for each print driver on your computer system, until you identify the driver that was leaking memory.
When you identify the leaking driver, go to the Product Support Services (http://go.microsoft.com/fwlink/?LinkId=1679) Web site and search the Knowledge Base for relevant articles.