Java Garbage Collection
by, 02-18-2012 at 03:26 PM (588 Views)
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 on continuous basis. Such process would stop the world. In that case requests will not get response by the resin.
Memory that has been specified along with –Xmn is that amount which is for Eden generation allocation. For old generation, the amount that has been allocated is –Xmx minus –Xmn.