문제

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

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top