JVM Architecture & Garbage Collection
JVM Architecture
class loader in detail
java memory areas
runtime data areas – 2 covered out of 5
runtime data areas rest 3
Execution engine
Garbage collection basic
compartments in heap
Eden space starts filling with object and ones in dark are marked for garbage collection
Post that the other objects in green are moved to Survivor1 space with an incremented count [for further decision on whether to put them in old gen or not]
Eden space is filled and again marking happen in all survivor spaces
They are then moved to another survivor space. This helps in compacting[if not done they will occupy non contiguous blocks in memory – similar to defragmentation ]
Again the marking process marks in eden in survivor space
Finally moved to another survivor space
After they cross this threshold they can be moved here.
There are majorly 4 types of GC collectors
G1 introduced in 1.7
UI – CMS , Parallel – batch processing
overview