Using the Klass gap (Was: Master Thesis on Shenandoah)
Andrew Haley
aph at redhat.com
Tue Jan 2 14:07:11 UTC 2018
On 02/01/18 11:23, Roman Kennke wrote:
> 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. :-)
Certainly. That negative index thing on the read barrier side is
rather icky.
--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the shenandoah-dev
mailing list