A Mouthful : "adaptive generational stop-and-copy mark-and-sweep" Garbage Collection
Today I was very much beaten up by one question I was asked for which I realized I never had a relevant answer till this moment. All these years in my career, I had never come across a situation where I was forced to find an answer for it either. Sadly, I had to agree that I didn’t knew the answer for which I should probably be badly punished. Coz the question was so simple and obvious for which I should have known the answer by now. The question was,
How does garbage collection works in Java?
I wasted no time to start digging into the details and was very determined that this should be last day of mine with no answer to this question. I came across handful of nice articles on the web which gave me a better idea about whats happening under the hood. After gathering some idea about GC, now I felt I could go ahead and have my lunch peacefully.
Anyways, here are some of the links which really enlightened me about how garbage collection works in Java. It was indeed a worth reading.
- A bit about garbage collection
- How does garbage collection works?
- Java’s garbage collected heap
- A brief history of garbage collection
Like one of these articles say, its true that,
” There is a lot of stuff you don’t know, but there’s even more stuff you don’t even know you don’t know.”