Request for review - 8022817: CMS should not shrink if compaction was not done
mikael.gerdin at oracle.com
Wed Aug 14 03:28:14 PDT 2013
On 2013-08-12 21:09, Jon Masamitsu wrote:
> 8022817: CMS should not shrink if compaction was not done
> If UseCMSCompactAtFullCollection is turned off, a full GC that is done
> in the foreground but does
> not compact should not shrink the generation. In that case a mark-sweep
> was done so the free space
> is maintained in freelists (not as a contiguous area at the end of the
> generation) and shrinking for
> freelists is not implemented.
I would prefer if the !did_compact() check was pulled up to
My reasoning is that shrink() already does a check for size > 0 before
calling shrink_by() to do the actual work.
I think it would be clearer if shrink() did the checks and shrink_by()
did the unconditional shrinking.
More information about the hotspot-gc-dev