Category: Garbage Collection

Garbage Collector Type

Type of Garbage Collector

Before discussing the type of garbage collector, it is important to understand some basic terms related to it. Stop the World Event: It is a time when all the application threads are stopped until the garbage collection operation completes. Both minor and major garbage collections are “Stop the World” events. -Xms: This command-line argument specifies the initial heap…
Read more

How does GC work, Minor GC, Major GC, Full GC

How does Garbage Collector work?

A Garbage Collector is a Java program which tracked the referenced (live) objects and allowed them to keep in the heap memory whereas the memory of the unreferenced (dead) objects is reclaimed and reused for future object allocation. To understand it more practically we have to take some pictorial examples of JVM object creation and management cycle. Let’s…
Read more

Memory Heap and Generation

What is Memory Heap? Heap is a portion of memory which is used for dynamic allocation. The blocks of the memory in the heap are frequently allocated and freed based on the status of the object. The allocation and release of memory take place in an arbitrary order and hence the unreferenced or dead objects…
Read more

Garbage Collection – Overview

A Garbage Collector is a Java program which tracked the referenced (live) objects and allowed them to keep in the heap memory whereas the memory of the unreferenced (dead) objects is reclaimed and reused for future object allocation. This method of reclaiming the unused memory is known as Garbage Collection. In Garbage collection, neither the explicit deletion…
Read more