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

InstanceKlass::_array_name is not needed and leaks

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 15
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b21

      Description

      The InstanceKlass::_array_name was introduced to have a pointer to decrement the refcount in the symbol [L<classname>; so that the class got unloaded, the array name is unloaded also. At that time, InstanceKlass::release_C_heap_structures() was only called for classes in the SystemDictionary. Now all the _klasses in the ClassLoaderData are walked and release_C_heap_structures can be called on Array classes also.

      At some point, maybe in permgen elimination, creating the array name called new_permanent_symbol so is never reclaimed.

      If the Klass::_name Symbol refcount is decremented during unloading for both ArrayKlass and InstanceKlass, there's no need for InstanceKlass::_array_name field.

        Attachments

          Activity

            People

            Assignee:
            coleenp Coleen Phillimore
            Reporter:
            coleenp Coleen Phillimore
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: