Using the Klass gap (Was: Master Thesis on Shenandoah)

Roman Kennke rkennke at redhat.com
Tue Jan 2 11:23:23 UTC 2018


Am 01.01.2018 um 21:29 schrieb Martin Grajcar:
>> * Am 08.11.2017 um 19:07 schrieb Dominik Inführ:*
> 
> I was pondering the idea to squeeze the fwd ptr into the so-called
>> Klass-gap. This is 32 unused bits when the Klass* is compressed. It's
>> only available for non-arrays, because for arrays, the array-length is
>> squeezed into those 32bits.
> 
> 
> A possibly stupid question, but shouldn't it be the other way round?
> 
> Currently, array length gets packed in a gap and you're thinking about
> using the gap -- when available -- for the fwd ptr. This sounds slow and
> complicated/
> 
> Can't you instead *always* use this gap for non-arrays and use a new slot
> for the array length? This saves memory for non-arrays in exactly the same
> way and needs no new conditional logic (I guess, arrays can already deal
> with the case they need a new slot  for their length).

Yes, this sounds like an attractive possibility. :-)

Thanks,
Roman



More information about the shenandoah-dev mailing list