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.
I don't agree with..
by steve on Tue 27th Apr 2004 18:32 UTC

the statement that garbage collection time is small. Any non-trivial Application will spend a large amount of time garbage collecting. The main problem with garbage collection is that it wastes memory and causes virtual memory to become a large damper on system performance.

Take the problem of programs that would like to use Virtual memory as a cache. Many programs load their GUI into RAM, the images of widgets, their config files, etc. Rather then read them off disk every time. When not needed and RAM is constrained, the memory this data is loaded into is swapped. Swapping this into RAM is usually faster then loading (and re-parsing the file) off the disk. However, mark and sweep gc routines require that all this data is constantly being swapped back into memory for the sole purpose of garbage collection. This is why java swing programs seem so slow.

When Longhorn comes out we will see how much better/worse programmers will treat their new enviroment.