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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • hs25
    • hs25
    • hotspot
    • gc
    • b52
    • Not verified

        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.

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

                Created:
                Updated:
                Resolved: