Flashcards

Quick study sessions to strengthen memory and retain key concepts.

Flashcard Study

Java: OutOfMemoryErrors

Front

Why use Thread Dumps for diagnosing performance issues?

Thread Dumps provide a snapshot of all threads' states, helping diagnose deadlocks and performance bottlenecks. Thread Dumps capture…

View Card →
Flashcard Study

Java: OutOfMemoryErrors

Front

How does ZGC minimize pause times?

ZGC minimizes pause times by using concurrent garbage collection and colored pointers. ZGC utilizes concurrent garbage collection and…

View Card →
Flashcard Study

Java: OutOfMemoryErrors

Front

How does G1 Garbage Collector achieve its goals?

G1GC aims for predictable pause times by dividing the heap into regions and collecting them incrementally. The G1…

View Card →
Flashcard Study

Java: OutOfMemoryErrors

Front

Compare Young and Old Generation in JVM Garbage Collection?

Young Generation is for short-lived objects; Old Generation is for long-lived objects. The Generational Garbage Collection model divides…

View Card →
Flashcard Study

Java: OutOfMemoryErrors

Front

Why does Metaspace in JVM matter in this design?

Metaspace stores class metadata in JVM, replacing PermGen. Metaspace is a memory area in the JVM that stores…

View Card →
Flashcard Study

Java: OutOfMemoryErrors

Front

How do static references cause memory leaks?

Static references can prevent objects from being garbage collected, causing memory leaks. Static references persist for the lifetime…

View Card →
Flashcard Study

Java: OutOfMemoryErrors

Front

Why is a Heap Dump useful for diagnosing memory issues?

A Heap Dump captures a snapshot of the JVM's heap memory, useful for analyzing memory usage and identifying…

View Card →
Flashcard Study

Java: OutOfMemoryErrors

Front

What triggers a java.lang.OutOfMemoryError in JVM?

It occurs when the JVM cannot allocate an object because it is out of heap memory. An OutOfMemoryError…

View Card →
Flashcard Study

Java: OutOfMemoryErrors

Front

What are common indicators of a memory leak in Heap Dumps?

Unusually large collections or retained sizes. In a Heap Dump, large collections retaining unexpected objects, like a session…

View Card →
Flashcard Study

Java: OutOfMemoryErrors

Front

How does G1GC achieve predictable pause times?

Uses a region-based approach for incremental collection. G1GC divides the heap into regions and prioritizes the collection of…

View Card →