Tag: garbage collector

Understanding Java Memory Management – 2

Let’s continue here with garbage collector, Garbage Collection Garbage collection is the process of freeing space in the heap or the nursery for allocation of new objects. Let’s look at the models of Garbage Collection. The Mark and Sweep Model Generational Garbage Collection Dynamic and Static Garbage Collection Modes Compaction The Mark and Sweep Model […]

Understanding Java Memory Management – 1

One interviewer asked me a question, “Do you know about Java Memory Management “. I started replying like this, “Heap and Stack are the parts of it. Heap is the place where we store the objects and stack is the place for storing the reference for those objects.” He started firing subsequent questions and I […]