Sign in
I know the answer (it's 42)
A blog on coding, .NET, .NET Compact Framework and life in general....
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Tags
Amazing India
Arduino
C# / .NET / Coding
DIY
Everything else
Fun
Garbage Collection
Mango
MIX11
NETCF
Pages
Ruby
Silverlight
Software
Team System
Tech
Technology
User interface
Windows Phone
WP7
WP8
WPDT
Browse by Tags
MSDN Blogs
>
I know the answer (it's 42)
>
All Tags
>
garbage collection
Tagged Content List
Blog Post:
Test Driven Development of a Generational Garbage Collection
Abhinaba Basu [MSFT]
These days everyone is talking about being agile and test driven development (TDD). I wanted to share a success story of TDD that we employed for developing Generational Garbage Collector (GC) for Windows Phone Mango. The .NET runtime on Windows Phone 7 shipped with a mark-sweep-compact ; stop the world...
on
15 Oct 2012
Blog Post:
WP7 Mango: The new Generational GC
Abhinaba Basu [MSFT]
In my previous post “ Mark-Sweep collection and how does a Generational GC help ” I discussed how a generational Garbage Collector (GC) works and how it helps in reducing collection latencies which show up as long load times (startup as well as other load situations like game level load) and gameplay...
on
14 Jun 2011
Blog Post:
WP7 Mango: Mark-Sweep collection and how does a Generational GC help
Abhinaba Basu [MSFT]
About a month back we announced that in the next release of Windows Phone 7 (codenamed Mango) we will ship a new garbage collector in the CLR. This garbage collector (GC) is a generational garbage collector. This post is a “ back to basics ” post where I’ll try to examine how a mark-sweep GC works and...
on
8 Jun 2011
Blog Post:
Generational GC in Windows Phone Mango
Abhinaba Basu [MSFT]
This is an announcement only post, do subscribe to this blog feed or on to http://twitter.com/abhinaba as I’d be making more detailed posts on how we are building the Generational GC and what developers need to know. Today in the MIX11 keynote ScottGu just announced something that I’ve been working...
on
13 Apr 2011
Blog Post:
WP7: When does GC Consider a Local Variable as Garbage
Abhinaba Basu [MSFT]
Consider the following code that I received: static void Foo() { TestClass t = new TestClass(); List<object>l = new List<object>(); l.Add(t); // Last use of l and t WeakReference w = new WeakReference(t); GC.Collect(); GC.WaitForPendingFinalizers(); Console.WriteLine...
on
4 Jan 2011
Blog Post:
Windows Phone 7 App Development: When does the GC run
Abhinaba Basu [MSFT]
If you are looking for information on the new Generational GC on Windows Phone Mango please visit http://blogs.msdn.com/b/abhinaba/archive/2011/06/14/wp7-mango-the-new-generational-gc.aspx Many moons ago I made a post on When does the .NET Compact Framework Garbage Collector run . Given that a lot...
on
29 Jul 2010
Blog Post:
Back to Basics: Memory leaks in managed systems
Abhinaba Basu [MSFT]
Someone contacted me over my blog about his managed application where the working set goes on increasing and ultimately leads to out of memory. In the email at one point he states that he is using .NET and hence there should surely be no leaks . I have also talked with other folks in the past where they...
on
4 Jan 2010
Blog Post:
NETCF: Count your bytes correctly
Abhinaba Basu [MSFT]
I got a stress related issue reported in which the code tried allocating a 5MB array and do some processing on it but that failed with OOM (Out of Memory). It also stated that there was way more than 5 MB available on the device and surely it’s some bug in the Execution Engine. Here’s the code. try{...
on
3 Dec 2009
Blog Post:
NETCF: GC and thread blocking
Abhinaba Basu [MSFT]
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 virtual machines (e.g. JScript) we do not have any...
on
2 Sep 2009
Blog Post:
How does the .NET Compact Memory allocator work
Abhinaba Basu [MSFT]
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 managed objects from this pool. This is...
on
31 May 2009
Blog Post:
Memory leak via event handlers
Abhinaba Basu [MSFT]
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 removing the event sink from the event invoker...
on
5 May 2009
Blog Post:
Finalizers and Thread local storage
Abhinaba Basu [MSFT]
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 to run in any specific order The thread on which...
on
29 Apr 2009
Blog Post:
.NET Code Pitching
Abhinaba Basu [MSFT]
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 to the following reasons It is targeted towards...
on
17 Apr 2009
Blog Post:
Multiple calls to GC.ReRegisterForFinalize
Abhinaba Basu [MSFT]
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 mc = new MyClass(); GC.ReRegisterForFinalize...
on
15 Apr 2009
Blog Post:
NETCF: Total Bytes in Use After GC – Perf counter
Abhinaba Basu [MSFT]
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. ”. The description lead him to believe it is the total...
on
31 Mar 2009
Blog Post:
How many heaps does the .NET Compact framework use
Abhinaba Basu [MSFT]
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 2005) but I thought I’d put up a handy list. Heap...
on
30 Mar 2009
Blog Post:
Dangers of large object heap
Abhinaba Basu [MSFT]
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 heap simply because it is primarily targeted towards...
on
24 Mar 2009
Blog Post:
.NET Compact framework GC Quantum
Abhinaba Basu [MSFT]
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 reset to 0 on each GC and it is incremented each...
on
23 Mar 2009
Blog Post:
Back To Basics: How does the GC find object references
Abhinaba Basu [MSFT]
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 counting, mark-sweep and even coping collectors...
on
3 Mar 2009
Blog Post:
Back To Basics: Generational Garbage Collection
Abhinaba Basu [MSFT]
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 is marked and swept. One of the primary optimization...
on
2 Mar 2009
Blog Post:
Back To Basics: Handling overflow in mark stage
Abhinaba Basu [MSFT]
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(); ObjectCollection roots = GetRoots(); for(int...
on
20 Feb 2009
Blog Post:
Back to Basics: Optimizing reference counting garbage collection
Abhinaba Basu [MSFT]
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. How does it still get used?” The advantages...
on
9 Feb 2009
Blog Post:
Back To Basics: Copying Garbage Collection
Abhinaba Basu [MSFT]
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. I’ll not be going into the gory details because this...
on
2 Feb 2009
Blog Post:
Back To Basics: Mark and Sweep Garbage Collection
Abhinaba Basu [MSFT]
This post is Part 4 in the series of posts on Garbage Collection (GC). Please see the index here. Recap of definition I’ll quickly repeat couple of definitions which are used in this post Object : This is a unit of storage on the heap. It generally means an object in the object oriented sense but is...
on
30 Jan 2009
Blog Post:
Back To Basics: Reference Counting Garbage Collection
Abhinaba Basu [MSFT]
This is Part 3 in a series of post on GC, visit the list here . Reference counting (refcounting) GC is one of the two primary GC mechanisms widely used. The basic workings of this GC is pretty simple and based on counting the number of reference to a memory block (or object) from other blocks. Each time...
on
27 Jan 2009
Page 1 of 2 (28 items)
1
2