Garbage collection is a necessity in modern languages which hides the problems of memory management from the programmer. However, the program incurs performance penalties due to garbage collection. Generational GC and concurrent GC reduce overheads of garbage collection.