littleguru wrote:

Hey Charles,

I have a few:

- What are the challenges in implementing a GC that is also written in managed code?

- Why does WeakReference not have a Event that fires upon the Garbage collector has collected the object (i have seen that WeakReference is integrated very deeply in the CLR - he might perhapshave infos on this)?

- What was the biggest challenge when building GC v1.0? Has the GC been written from scratch for .NET 1.0?

- Why isn't it possible to force the GC to do a collect. I mean GC.Collect() just signalizes that a collect is required, but the GC could decide to do not. Why has this been implemented in that way?

- I have seen that memory is not always returned to the Windows operating system. I know that requesting memory from Windows is slow. What's the threshold here? Does this vary from Windows to Windows? Windows XP vs Windows Server 2003...

- What are the major differences between the GC in the compact framework and the GC in the full desktop framework? What should we look after when we code for the compact framework and want the GC to be efficient?

- Are there any upcoming changes for .NET 3.5? Why does WeakReference still not have a Collected event?

- What was the biggest (big as hardest to fix) bug he ever found in the GC?

- Is the GC building the reachable tree on each run? Or are there caching mechanism build in? How long does an average run take (I don't know if this one is possible to respond to)?

- When a class implements a finalizer and the GC detects that the class is no longer referenced the finalizer is called and the class is put in a separate list and removed in the next run. What were the decissions to build that in this way? Why not clean the immediately after all other classes have been removed - why wait for the next run?