RFR: Add remaining unused free space to 'used' counter in free list

Roman Kennke rkennke at redhat.com
Tue Dec 13 17:16:36 UTC 2016


Am Dienstag, den 13.12.2016, 18:10 +0100 schrieb Aleksey Shipilev:
> On 12/13/2016 06:03 PM, Roman Kennke wrote:
> > I noticed that when a program allocates many objects that are
> > slightly
> > larger than half a region, we would continuously run into full GC.
> > The
> > reason is that when we skip to next region for allocation, we did
> > not
> > count the remaining unused free space as 'used', and thus barely
> > reported half of heap remaining when running OOM. Oops.
> > 
> > Fixed in ShenandoahFreeList by adding last-current-region's
> > remaining
> > free() to the free-lists used.
> > 
> > Ok?
> > 
> > http://cr.openjdk.java.net/~rkennke/fixused/webrev.00/
> 
> I don't see how it matches with the reverse operation, which
> decrements based on
> region used size only, not its free size?
> 
> See:
>        heap->decrease_used(region->used());
>       _heap->decrease_used(r->used());

This is in the heap. The patch addresses the ShenandoahFreeList.

I checked it, for heap used counters, decrease and increase do match.

Roman


More information about the shenandoah-dev mailing list