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
       
    Thu Nov 18 08:31:52 UTC 2021
    
    
  
> The relationship is: Segmented array (1) <---> (N) buffer (1) <---> (M) element. So element is an item, e.g. an offset, a pointer, ...
Picking one suggestion from your first email:
G1CardSetAllocator::_num_free_nodes
node -> elem
`_num_free_slot` is, IMO, more accurate. An element is sth the user of the segmented array who provides.
> can I assume you mean: Segmented array (1) <---> (N) slot (1) <---> (M) element ?
One segmented array contains N subarray, each subarray contains M slots (M can be different for different subarrays), each slot contains a single element (provided by users of this data structure) or empty (initial state).
segmented array (1) -- subarray (N) -- slot (M) -- element (1)
/Albert
    
    
More information about the hotspot-gc-dev
mailing list