RFR: 8273626: G1: refactor G1CardSetAllocator to support element size less pointer size

Hamlin Li mli at openjdk.java.net
Sat Sep 11 05:14:04 UTC 2021


To finish https://bugs.openjdk.java.net/browse/JDK-8254739, we need a segmented array to store a growing regions index array, in the initial version of that patch, a newly home made segmented array was used, but the memory efficiency is not as good as expected, G1CardSetAllocator is a potential candidate to fullfill the requirement, but need some enhancement.

This is a try to enhance G1CardSetAllocator(and G1CardSetBuffer, G1CardSetBufferList) to support element size less pointer size, and strip this basic function as a more generic segmented array (G1SegmentedArray).

-------------

Commit messages:
 - Clean code
 - Fix wrong length() in SegmentedArrayBuffer, cause it might grow more than _elem_nums
 - Initial commit

Changes: https://git.openjdk.java.net/jdk/pull/5478/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5478&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8273626
  Stats: 805 lines in 7 files changed: 513 ins; 275 del; 17 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5478.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5478/head:pull/5478

PR: https://git.openjdk.java.net/jdk/pull/5478



More information about the hotspot-gc-dev mailing list