.NET Blog

Free. Cross-platform. Open source. A developer platform for building all your apps.

64-bit vs 32-bit
As 64-bit machines become more common, the problems we need to solve also evolve. In this post I’d like to talk about what it means for the GC and the applications’ memory usage when we move from 32-bit to 64-bit.   One big limitation of 32-bit is the virtual memory address space - as a user mode process you get 2GB, and if you use la
He’s live… he’s live not… he’s live…
I was making some code changes today and thought this was interesting to share. As you know, the WeakReference class has a getter and a setter method to get and set the Target which is what the weakref points to. See Using GC Efficiently – Part 3 for more details on WeakReference.   Note that the code below is only for illustration purp
Difference Between Perf Data Reported by Different Tools – 4
.NET CLR Memory\% Time in GC counter and !runaway on thread(s) doing GC. The 2 common ways people use to look at the time spent in GC are the % Time in GC performance counter under .NET CLR Memory, and the CPU time displayed by the !runaway debugger command in cdb/windbg. What do they mean exactly? % Time in GC is calculated like this: When th
Difference Between Perf Data Reported by Different Tools – 3
Both the !SOS.gchandles command (added in CLR 2.0) and the .NET CLR Memory\# GC Handles counter show you the number of GC handles you have in your process. The # GC Handles counter is one of the rare counters in the .NET CLR Memory category that doesn’t get updated at the end of each GC. Rather we update it in the handle table code, for exa
Difference Between Perf Data Reported by Different Tools – 2
Managed Heap Size We have both .NET CLR Memory perf counters and SoS extensions that report manged heap size related data. Difference 2 There are a few .NET CLR Memory counters that are related to the managed heap size: # Total Committed Bytes # Total Reserved Bytes I explained what these counters mean here. Now, how are t
Difference Between Perf Data Reported by Different Tools – 1
So, there are many perf tools and some of them report either the same or the same type of data. I want to talk about various differences between the ones related to managed heap investigation. This is not supposed to cover everything..just the ones I think people use frequently. Managed Heap Size We have both .NET CLR Memory perf counters and
Not seeing the WKS:: and the SVR:: namespace?
These namespaces were introduced in CLR 2.0. For example for the   GCHeap::GcCondemnedGeneration   symbol, it's WKS::GCHeap::GcCondemnedGeneration for Workstation GC and SVR::GCHeap::GcCondemnedGeneration for Server GC (if you are reading the Investigating Memory Issues article in the recent MSDN magazine and are trying out some of
Check out the CLR Lead Architect’s New Blog
Many people know Patrick Dussud by his outstanding work on Garbage Collection. But did you know he was one of the founders of the CLR? In his intro blog entry he talks about how the CLR came to life. I am sure it will be a great read for those of you who are curious about it.
My application seems to hang. What do I do? – Part 2
Last time I talked about the hang scenario where your process is taking 0 CPU and the CPU is taking by other process(es) on the same machine.   The next scenario is your process is taking 0 CPU and the CPU is barely used by other processes.   As one of the readers correctly pointed out, this is very likely because you have a deadloc
Correlating the output of !eeheap -gc and !address
!address is a very powerful debugger command. It shows you exactly what your VM space looks like. If you already got the output from the !sos.eeheap -gc command (refer to this article for usage on sos), for example: 0:003> !eeheap -gcNumber of GC Heaps: 1generation 0 starts at 0x01245078generation 1 starts at 0x0124100cgeneration 2 starts a