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.
Re: I don't agree with..
by Marcus Sundman on Wed 28th Apr 2004 20:44 UTC

> > 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.
> What do you mean by "constantly"? If you use a generational
> GC (which is the default on the Sun Java VMs), most GC runs
> happen in the nursery or eden space (the new generation).

Pages with eden are seldom swapped out since they are constantly in use.

> The Old generation does, but GC runs happen much less
> often there.

In GUI design the rule of thumb is that reaction latency should never exceed 0.1 seconds. (This is because of our perception of cause and effect, and keeping the cognitive load at a minimum.) It's not OK if a GUI program has 2-3 second pauses every minute, and a JVM that pauses for a minute several times per hour is totally unacceptable for GUI programs. Now combine this with the poor VM performance of linux (especially 2.6) and you get a disaster. I've experienced several GC pauses of half an hour and one of about an hour, during which the linux POS is totally unusable.