For sake of of Garbage collection in Java, JVM divided into 3 parts
1. Young Generation/New Generation
2. Tenured Generation/ Old Generation
3. Permanent
Young Generation again divided into 3 parts
|----Eden Space
|----Survivor 1
|----Survivor 2
When object created in in side Heap(Eden Space)
|
|
Minor Garbage collection done in Eden Space, if objects exists after GC moved to Survivor 1
|
Survivor 1
|
|
After GC done in Survivor 1 then it moves to Survivor 2
|
Survivor 2
|
After Major GC done, moved to Old Generation
|
Old Generation
Permanent : It holds Methods and Meta data of class
Eden : When object created , that exist in Eden
Survivor 1: After minor GC on Eden remaining objects exists here.
Survivor 2: After minor GC on Survivor 1 remaining objects exists here
Old Generation: After major GC on Survivor 2, remaining objects exists here.
1. Young Generation/New Generation
2. Tenured Generation/ Old Generation
3. Permanent
Young Generation again divided into 3 parts
|----Eden Space
|----Survivor 1
|----Survivor 2
When object created in in side Heap(Eden Space)
|
|
Minor Garbage collection done in Eden Space, if objects exists after GC moved to Survivor 1
|
Survivor 1
|
|
After GC done in Survivor 1 then it moves to Survivor 2
|
Survivor 2
|
After Major GC done, moved to Old Generation
|
Old Generation
Permanent : It holds Methods and Meta data of class
Eden : When object created , that exist in Eden
Survivor 1: After minor GC on Eden remaining objects exists here.
Survivor 2: After minor GC on Survivor 1 remaining objects exists here
Old Generation: After major GC on Survivor 2, remaining objects exists here.
No comments:
Post a Comment