"In Java, GC is the process of automatically identifying and reclaming memory occupied by objects that are no longer reachable.. the process involves the 3 steps
Mark phase -- identify the objects that are still in use. i.e reachable
sweep Phase -- removes the unreachable objects
compact phase -- rearragnes objects to prevent fragmentation
4 types of Garbage collection
Serial GC -- single threaded simple and compacting -- best for small applications
Parrallel GC -- throughput GC"
Sue G. - "In Java, GC is the process of automatically identifying and reclaming memory occupied by objects that are no longer reachable.. the process involves the 3 steps
Mark phase -- identify the objects that are still in use. i.e reachable
sweep Phase -- removes the unreachable objects
compact phase -- rearragnes objects to prevent fragmentation
4 types of Garbage collection
Serial GC -- single threaded simple and compacting -- best for small applications
Parrallel GC -- throughput GC"See full answer
Software Engineer
Concept
🧠Want an expert answer to a question? Saving questions lets us know what content to make next.