Heap - garbage collection for specific circumstances

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

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

Answers

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 http://www.cse.nd.edu/~dthain/courses/cse40243/spring2006/gc-survey.pdf

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/5121560/garbage-collection-for-specific-circumstances

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils