Re: 答复: Discussion about unifying the wording buffer/node/element in G1, especially classes using G1SegmentedArray and related classes

Thomas Schatzl thomas.schatzl at oracle.com
Thu Nov 18 08:24:39 UTC 2021


Hi,

On 18.11.21 02:35, lihuaming (A) wrote:
> 
>>> A segmented array consists of several buffers one of which consists of several element (or node? we should choose one of element or node).
>>
>> The term "buffer", to me, means a memory area used to hold data temporarily before data can be properly consumed, such as read/write buffers. Looking at the internals of `class G1SegmentedArrayBuffer`, I think it is essentially a dynamically-allocated array.
> 
> Thanks Albert, yes, you're right.
> 
>>
>> "element" often refers to an item, not the container. Maybe a more accurate word here is "slot".
> 
> The relationship is: Segmented array (1) <---> (N) buffer (1) <---> (M) element. So element is an item, e.g. an offset, a pointer, ...
> 
>>
>> Therefore, my 2 cents: a segment array consists of several singly-linked subarray of potentially different length and potentially different slot size.
> 
> I'm not sure if I understand your point correctly, can I assume you mean: Segmented array (1) <---> (N) slot (1) <---> (M) element ?
> 

I think Albert suggests:

segmented array (1) <---> (N) ???? (1) <---> (M) slot

I am kind of taking a liking to "slot".

Another option to "buffer" for the ???? could be "segment".

Thanks,
   Thomas



More information about the hotspot-gc-dev mailing list