Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Garbage Collection   (RSS)

NETCF: GC and thread blocking

One of our customers asked us a bunch of questions on the NETCF garbage collector that qualifies as FAQ and hence I thought I’d put them up here. Question: What is the priority of the GC thread Answer: Unlike some variants of the desktop GC and other
Posted by abhinaba | 0 Comments

How does the .NET Compact Memory allocator work

As I mentioned in one of my previous posts the .NET Compact Framework uses 5 separate heaps of which one is dedicated for managed data and is called the managed heap. The .NETCF allocator, allocates pools of data from this managed heap and then sub-allocates
Posted by abhinaba | 0 Comments

Memory leak via event handlers

One of our customers recently had some interesting out-of-memory issues which I thought I’d share. The short version The basic problem was that they had event sinks and sources. The event sinks were disposed correctly. However, in the dispose they missed

Finalizers and Thread local storage

Writing finalizers is generally tricky. In the msdn documentation for finalizers the following limitations are mentioned. The exact time when the finalizer executes during garbage collection is undefined The finalizers of two objects are not guaranteed

.NET Code Pitching

The word pitch can have many meanings, but in case of the code pitching it is used in the sense of “to throw away”. The desktop CLR never throws away or pitches native code that it JITs. However, the .NET Compact Framework CLR supports code pitching due

Multiple calls to GC.ReRegisterForFinalize

What happens when there are multiple calls to GC.ReRegisterForFinalize for the same object? Consider the following C# code class MyClass { ~MyClass() { Console.WriteLine("~MyClass"); } } class Program { static void Main(string[] args) { MyClass

NETCF: Total Bytes in Use After GC – Perf counter

At least one of our customers were a bit confused with the .NET Compact Framework performance counter “Total Bytes in Use After GC” which is described as “ The number of bytes of memory, native and managed, in use after the last garbage collection. ”.

How many heaps does the .NET Compact framework use

While discussing the memory architecture with an internal customer, he inquired about how many heaps .NETCF creates. I’m not sure how it might be helpful to users, but the answer is 5. This has been touched upon in some blogs and presentations (e.g. MEDC

Dangers of large object heap

Andrew Hunter has an interesting post on the issues with large object heap on the desktop CLR. Visit http://www.simple-talk.com/dotnet/.net-framework/the-dangers-of-the-large-object-heap/ Side Note: .NET Compact Framework doesn’t support large object

.NET Compact framework GC Quantum

In my post When does the .NET Compact Framework Garbage Collector run I mentioned that one of the causes for starting a garbage collection is that 1 MB of data has been allocated from the last garbage collection. Essentially we keep a counter which is

Back To Basics: How does the GC find object references

This post is Part 9 in the series of posts on Garbage Collection (GC). Please see the index here. Most garbage collection algorithms needs to know all other objects referenced by a given object to correctly traverse object hierarchy. All of reference

Back To Basics: Generational Garbage Collection

This post is Part 8 in the series of posts on Garbage Collection (GC). Please see the index here. One of the primary disadvantage discussed in the post on mark-sweep garbage collection is that it introduces very large system pauses when the entire heap

Back To Basics: Handling overflow in mark stage

This post is Part 7 in the series of posts on Garbage Collection (GC). Please see the index here. Let’s first recap the basic algorithm of the mark-sweep garbage collection . In C like pseudo code the algorithm looks like void GC() { HaltAllThreads();

Back to Basics: Optimizing reference counting garbage collection

This post is Part 6 in the series of posts on Garbage Collection (GC). Please see the index here. One of the comments on my previous post on reference counting GC prompted this post. The comment goes as “Ref counting GC seems to have some hard issues.

Back To Basics: Copying Garbage Collection

This post is Part 5 in the series of posts on Garbage Collection (GC). Please see the index here. In my previous post I have discussed reference counting and mark-sweep garbage collector in some detail. This post is a quick intro into the copying GC.
More Posts Next page »
 
Page view tracker