JVM memory-ஐ தானாக நிர்வகிக்கிறது — objects-ஐ ஒதுக்கி, அணுக முடியாதவற்றை garbage collection (GC) மூலம் விடுவித்து — எனவே நீங்கள் memory-ஐ கைமுறையாக விடுவிக்க வேண்டியதில்லை. memory regions மற்றும் GC behavior-ஐ புரிந்துகொள்வது செயல்திறனை tune செய்வதற்கும் memory சிக்கல்களைக் கண்டறிவதற்கும் முக்கியம்.
JVM memory regions
HEAP — where all OBJECTS live (shared across threads), GC operates here
├── Young Generation — new objects (most die young)
│ ├── Eden — new allocations go here
│ └── Survivor — objects that survived a young GC
└── Old (Tenured) Gen — long-lived objects (promoted from young)
STACK — per-thread; method frames, local variables, primitive locals, references
Metaspace — class metadata (replaced PermGen in Java 8+)
