Linked by Zachary Pinter on Tue 27th Apr 2004 17:09 UTC
General Development Garbage collection (GC) is a technology that frees programmers from the hassle of explicitly managing memory allocation for every object they create. Traditionally, the benefit of this automation has come at the cost of significant overhead. However, more efficient algorithms and techniques, coupled with the increased computational power of computers have made the overhead negligible for all but the most extreme situations.
Permalink for comment
To read all comments associated with this story, please click here.
@edwardr
by Rayiner Hashem on Tue 27th Apr 2004 20:29 UTC

This is very true. Good memory managers that use different policies for different heaps can have extremely good performance for many common workloads. For example, generational GCs are very good for functional code that quickly creates then destroys lots of objects. The overhead is much less than it would be when using a fully general-purpose memory allocator. Depending on your workload, a good GC will be on average as fast as a good malloc(). When you have detailed knowledge about your program's memory allocation patterns, you can outperform both using customized allocators (eg: pool allocators), but then again, a good memory manager will offer you a range of memory management options in addition to plain GC.