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

Possible bug in garbage collector related to soft refs - mostly performance

    XMLWordPrintable

Details

    • 1.0.2
    • sparc
    • generic
    • Not verified

    Description

      The bug is in clearRefpointers. I believe the effect is to bail out too early,
      leaving soft refs valid and expanding when memory could have been reused.

      The bug is in the calculation of freemem:
         freemem += obj_len((char *)bag[i].ref - sizeof(hdr));

      I first noticed that the ".ref" expression points to another handle, not an
      object, so we should be doing ".ref->obj". After that I noticed that this is
      the wrong object. We really need:
           freemem += obj_len((char *)obj_getslot(bag[i].ref, 0)->obj - sizeof(hdr));

      Attachments

        Activity

          People

            tlindholsunw Timothy Lindholm (Inactive)
            drwhite Derek White
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: