答复: Discussion about unifying the wording buffer/node/element in G1, especially classes using G1SegmentedArray and related classes
lihuaming (A)
lihuaming3 at huawei.com
Thu Nov 18 01:35:26 UTC 2021
> > 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 ?
Thanks
-Hamlin
More information about the hotspot-gc-dev
mailing list