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

Albert Yang albert.m.yang at oracle.com
Wed Nov 17 19:09:32 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.

"element" often refers to an item, not the container. Maybe a more accurate word here is "slot".

Therefore, my 2 cents: a segment array consists of several singly-linked subarray of potentially different length and potentially different slot size.

/Albert


More information about the hotspot-gc-dev mailing list