G1: Call offset_of directly in subclasses of G1CardSetContainer

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 19
    • Affects Version/s: 19
    • Component/s: hotspot
    • gc
    • b23

      Instead of

      ```
      class G1CardSetArray : public G1CardSetContainer {

        template<typename Derived>
        static size_t header_size_in_bytes_internal() {
          return offset_of(Derived, _data);
        }
        
        ...
        
        static size_t header_size_in_bytes() { return header_size_in_bytes_internal<G1CardSetArray>(); }

      }
      ```

      one can call `offset_of` directly on calculating the header size. The same pattern exists in other subclasses.

            Assignee:
            Albert Yang
            Reporter:
            Albert Yang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: