RFR (XS): 8014405: G1: PerRegionTable::fl_mem_size() calculates size of the free list using wrong element sizes

Thomas Schatzl thomas.schatzl at oracle.com
Fri May 17 07:14:32 UTC 2013


Hi,

  some minor clarification about some comment:

On Fri, 2013-05-17 at 08:58 +0200, Thomas Schatzl wrote:
> Hi,
> 
> On Fri, 2013-05-17 at 08:04 +0200, Bengt Rutisson wrote:
> > Hi Thomas,
> > 
> > On 5/16/13 5:00 PM, Thomas Schatzl wrote:
> > > Hi,
> > >
> > Yes, it is this internal knowledge that worries me. It does not seem 
> > unreasonable for someone to add a check in methods like alloc() or 
> > free() that checks that the new or old HR is consistent in some way.
> > 
> > However, there are no such checks now, so I guess it is fine to use NULL.

If one is added, the test will simply fail.

> 
> The problem I see is that for a real proper, independent test we would
> need to mock an entire G1CollectedHeap and associated data structures
> (e.g. policy, HeapRegions, etc).
> 

Fyi, the reason why I say this is that the constructor of PerRegionTable
uses HeapRegion::GrainBytes which is initialized by the G1CollectedHeap
btw. There may be other such dependencies deeper.

Thomas





More information about the hotspot-gc-dev mailing list