Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8285984

G1: Use standard idiom for inlined payload in G1SegmentedArraySegment

    XMLWordPrintable

Details

    • gc

    Description

      G1SegmentedArraySegment is an object where arbitrarily sized payload data is inlined into the object.

      There is a `_bottom` pointer in the class that points to this payload.

      Typically in hotspot gc we tend to use some `sometype _data[1]` or so member to point to that (arbitrarily sized) data.
      It would be preferable to do that here as well.

      Further, DEFAULT_CACHE_LINE_SIZE alignment is not necessary for the payload - just regular alignment provided by malloc/new is sufficient (iirc). Maybe such a change could be investigated too.

      Maybe it's not worth doing as the payload is typically fairly large (is it?) anyway.

      Note: We use memset on the payload which creates the need for the alignment on payload, however this doesn't have to be DEFAULT_CACHE_LINE_SIZE alignment.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: