how gc works inside jvm