MediumπŸ‘€ 3-5 yearsπŸ‘€ 8-15 years 1 min read Updated Aug 24, 2026

Young vs Old Generation β€” Minor vs Major GC

Reviewed by Gurusankar M. Β· Updated Aug 24, 2026

Asked inAmazonMicrosoftDeloitte
#generational gc#young gen#old gen#eden#survivor#minor gc
Report issue

⚑ Short Answer

The weak generational hypothesis: most objects die young. So the heap splits into Young (Eden + 2 Survivors) collected often and cheaply (minor GC), and Old (tenured) collected rarely (major/full GC). Survivors that age past a threshold are promoted to Old.

β˜•Coffee Chat Question

Concept Made Simple

β€œWhy is the heap split into young and old generations, and what's a minor vs major GC?”

🧠Mind Map Answer

Remember It Faster

Eden→new objects allocate here
Survivor S0/S1β†’survive a minor GC, age++
Old/Tenured→long-lived, major/full GC
Promotionβ†’age β‰₯ threshold β†’ Old

πŸ”₯What If?

Think Beyond the Expected

Allocation rate is huge and minor GCs are frequent β€” is that bad?

Not necessarily. Minor GCs are cheap because most young objects are already dead (copying only survivors). Frequent minor GC with short pauses is fine; the problem is when objects get prematurely promoted to Old, causing expensive major GCs.

πŸ˜‚Real World

Generational GC is why allocating lots of short-lived objects (per-request DTOs) is usually cheap β€” they die in Eden and never reach Old gen. Premature promotion (from undersized young gen) is a classic tuning issue.

🎯Interviewer's Expectation

Keywords they're listening for:

βœ“ weak generational hypothesisβœ“ Eden/Survivor/Oldβœ“ minor vs major/full GCβœ“ promotion by ageβœ“ copying collector for young

⚠️Common Mistakes

  • βœ—Assuming frequent minor GC is a problem
  • βœ—Undersized young gen causing premature promotion
  • βœ—Confusing major GC with full GC

βœ…Best Practices

  • βœ“Size young gen to keep short-lived objects out of Old
  • βœ“Watch promotion rate, not just GC count
  • βœ“Profile allocation before tuning

πŸ”Follow-up Questions

  • 1What is premature promotion and how do you fix it?
  • 2How does the survivor-space tenuring threshold work?
  • 3Why is a minor GC a 'copying' collection?

🧩Related Technologies

G1Parallel GCGC logs

Continue Learning with AI

Take this question deeper with your favourite AI assistant. Pick a depth, copy the prompt, or open it directly β€” AI is your learning companion, not a shortcut.

Plain-language foundations

I'm preparing for a software engineering interview and want to understand this from scratch, as a beginner.

Topic: Garbage Collection (JVM)
Interview question: "Why is the heap split into young and old generations, and what's a minor vs major GC?"

Please:
1. Explain the core idea in simple, plain language, using an everyday analogy.
2. Define any technical terms you use.
3. Walk through one small, concrete example.
4. Finish with a single sentence I can easily remember.

Keep the tone friendly and assume I'm new to this topic.

Was this answer helpful?

Support our platform by exploring our recommended products.

As an Amazon affiliate, purchases through these links may earn us a small commission β€” at no extra cost to you. It helps keep Full Stack Interview Guru free.

Related Questions