garbage collection for specific circumstances

99 views Asked by At

I'm working with just the basics of garbage collection and the different algorithms of each (plus pro's con's etc..). I'm trying to determine that best garbage collection algorithm to use for different scenarios.

such as: everything on heap same size, everything small w/ short lifespan, everything large w/ longer lifespan.

-if the everything is the same size heap fragmentation isn't an issue. Also I wouldn't have to worry about compaction. So maybe reference counting?

-small obj w/ short lifespan?

-large obj w/ longer lifespan? (possibly generational because of lifespan)

I'm looking at: Reference counting, Mark & Sweep, Stop & Copy and Generational

1

There are 1 answers

0
Daniel Ralston On BEST ANSWER

Paul Wilson's paper, "Uniprocessor Garbage Collection Techniques" is a very handy survey of garbage collection algorithms. It's a few years old, but most of what he covers is still relevant today. And, he includes information on performance, and so on. Just remember that CPU instructions aren't as expensive as they were 20 years ago. ;)

http://www.cse.nd.edu/~dthain/courses/cse40243/spring2006/gc-survey.pdf