I have a windows service that contains a memory leak. I am currently using PerfMon to determine where the leak is located. While my service is in the process of building report pdf's from DataSets and CrystalReports, my "# Bytes in all Heaps" is in check, and it being collected just fine. However my "Private Bytes" is very slowing growing, and after producing 10,000 reports is some 500 MB greater than the size of my "Bytes in all Heaps".
My application is running producing these reports in multiple threads. The main issue is that when I look at "# of current logical Threads", and "# of current recognized threads", the counters are all over the place. One second I will have a resonable number like 2-10, and then it will spike to 4,294,967,295, and it's back to 2-10.
The counter for "# of current logical Threads" did this spiking for a while, and then just finally stayed up around 4,294,967,236 fluctuating by about 10 in either direction.
Is my PerMon messed up, or is it my threading model?
It's only when I run large sets of reports that I run into this issue, otherwise the memory is kept in check. Oh, and the number of threads that are allowed to execute at a given moment is limited to the number of cores on the box.