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

Metspace::should_expand mixes bytes and words in check against MaxMetaspaceSize

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: hs25
    • Fix Version/s: hs25
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • Resolved In Build:
      b52
    • Verification:
      Not verified

      Backports

        Description

        The following code in Metaspace::should_expand:

        if (!FLAG_IS_DEFAULT(MaxMetaspaceSize)) {
          size_t real_allocated = Metaspace::space_list()->reserved_words() +
              MetaspaceAux::allocated_capacity_bytes(Metaspace::ClassType);
          if (real_allocated >= MaxMetaspaceSize) {
            return false;
          }

        doesn't convert Metaspace::space_list()->reserved_words() to bytes, as it should.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  stefank Stefan Karlsson
                  Reporter:
                  stefank Stefan Karlsson
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: