Calling Runtime.gc twice

David Sinclair dsinclair at chariotsolutions.com
Sat Apr 1 00:11:32 UTC 2017


Ah, didn't think of that. I'll take a couple of heap dumps to try and
confirm that.

Thanks Kirk

On Friday, March 31, 2017, Kirk Pepperdine <kirk at kodewerk.com> wrote:

> Most likely the second GC is reclaiming Reference types identified during
> the first collection. Finalization is a likely candidate as it take one
> collection to get it into the reference queue, the queue is then process
> and the finalized object can finally be reclaimed.
>
> Kind regards,
> Kirk Pepperdine
>
> > On Mar 31, 2017, at 8:53 PM, David Sinclair <dsinclair at chariotsolutions.
> com> wrote:
> >
> > Hi all,
> >
> > I was hoping for an explanation of why calling Runtime.gc() twice shows
> a significant improvement in memory reclaimed as opposed to calling it once.
> >
> > Thanks
> >
> > dave
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20170331/ec052eb3/attachment.htm>


More information about the hotspot-gc-dev mailing list