Applies to .NET 1.0, 1.1 and 2.0.
This information has been extracted from the MSDN article, Identify and Prevent Memory Leaks in Managed Code, by James Kovacs.
Useful PerfMon Counters
Process/[Private Bytes]
Reports all memory that is exclusively allocated for a process and can't be shared with other processes on the system.
.NET CLR Memory/[# Bytes in All Heaps]
Reports the combined total size of the Gen0, Gen1, Gen2 and large object heaps.
.NET LocksAndThreads/[# of current logical Threads]
Reports the number of logical threads in an AppDomain.
Interpreting the Results
The following problems may be identified:
- Thread Stack Leaks - [# of current logical Threads] increases unexpectedly
- Unmanaged Memory Leaks - [Private Bytes] increases but [# Bytes in All Heaps] remains stable
- Managed Memory "Leaks" - [Private Bytes] increases AND [# Bytes in All Heaps] increases
1 comment:
Post a Comment