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

clarify use and role of clear() and Recycle() in ObjectMonitor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 15
    • hotspot
    • generic
    • generic

      David sent the following query:

      On 12/16/19 11:56 PM, David Holmes wrote:
      > Hi Dan,
      >
      > Given that we always call
      >
      > m->Recycle()
      >
      > after
      >
      > ObjectMonitor * m = om_alloc(..);
      >
      > why do we also call Recycle() when we are putting an OM back into a freelist? Seems completely unnecessary to me.
      >
      > Also wondering if there is any particular reason why Recycle() doesn't set _Responsible = NULL ? Seems to me Recycle() is not completely clear on what its job is.
      >
      > I'm trying to understand all the nuances here as part of the JavaObjectMonitor work - which progresses very very slowly.
      >
      > Thanks,
      > David

            dcubed Daniel Daugherty
            dcubed Daniel Daugherty
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: