How Serial Garbage Collector works in the HotSpot virtual machine
The Serial Garbage Collector was one of the first garbage collectors in the HotSpot VM. While this collector is running, the application is suspended and continues to run only after garbage collection has stopped. Application memory is divided into three spaces: Young generation . Objects are created in this particular area of memory. Old generation . Objects that survive "minor garbage collection" are moved to this area of memory. Permanent generation . Here metadata about objects, Class data sharing (CDS), String pool are stored. The permanent area is divided into two: read-only and read-write. Obviously, in this case, the read-only area is never cleaned up by the garbage collector. The Young generation memory area consists of three areas: Eden and two smaller Survivor spaces - To space and From space. Most objects are created in the Eden area, with the exception of very large objects that cannot be placed in it and therefore are immediately placed in the Old ge...