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

Split ReservedSpace constructor to avoid default parameter

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 17
    • Fix Version/s: 17
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc
    • Resolved In Build:
      b19

      Description

      We have this constructor in ReservedSpace:
        // Initialize the reserved space with the given size. If preferred_page_size
        // is set, use this as minimum page size/alignment. This may waste some space
        // if the given size is not aligned to that value, as the reservation will be
        // aligned up to the final alignment in this case.
      ReservedSpace(size_t size, size_t preferred_page_size = 0);

      Instead of having the default parameter using two constructors would make the implementation more straight forward.

      This cleanup is another step towards JDK-8261527.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sjohanss Stefan Johansson
              Reporter:
              sjohanss Stefan Johansson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: