Advanced Java programming.
Java provides support for its memory management by using its built-in mechanism. In Garbage collector, two threads run.
• Responsibility of 1st thread is memory collections, primarily heap. It is quite light weighted.
• 2nd thread is considered to be a full “GC thread”. When comes memory shortage, entire heap is
traversed by it. Spaces for the objects are allocated by it.
When there is inadequate heap allocation or memory leak then full GC thread runs