Fundamentals of garbage collection