Re: memory allocation
On Apr 26, 7:38 pm, Mark Space <marksp...@sbc.global.net> wrote:
Basically yes. It actually runs the garbage collection at least twice,
I didn't know that... I tought that it was actually
possible to get OOM even tough technically there were
objects that could be GCed but that weren't... Yet.
Well, take what I say with a grain of salt. I was posting based on
remembering an account of debugging JVM performance issues. The JVM was
slowing getting slower and slower, and a memory leak was suspected.
Logging in through a JPDA (? debug...) port showed this was the case.
But when things got really stressed out I remember the GC would run
twice (JPDA allows you to see when the GC runs, what kind of pass it's
doing, and memory allocation before and after). The first pass was a
"quick get rid of objects in the first generation" and the second pass
was "that didn't work, try to pack everything into an older generation
But that's what I'm going by, not a spec or anything, but a remembered
account of watching a live system deal with a memory leak. I can't
guarantee that there aren't some situations where your technique would
be needed. I'll read the article you posted a link to now. It would be
interesting if there were some way to test this.