Once an
object is survived from garbage collection, then it is moved to different
generation of memory.
For
example, Java maintains two generations of memory.
a. Young Generation
b. Old Generation
When an
object is created, it puts into young generation. When the young generation
become full, Java runs garbage collector on young generation region. The object
that survive the multiple garbage collection cycles are promoted to Old
region. Java Garbage collector runs more frequently on young generation as
compared to old region.
No comments:
Post a Comment