<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <pre style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(238, 238, 238);"><span class="new" style="color: blue; font-weight: bold;"> 623 #define FREE_C_HEAP_OBJECT_ARRAY(type, array_name, size, memflags)                  \</span>
<span class="new" style="color: blue; font-weight: bold;"> 624   {                                                                                 \</span>
<span class="new" style="color: blue; font-weight: bold;"> 625     if (array_name != NULL) {                                                       \</span>
<span class="new" style="color: blue; font-weight: bold;"> 626       for (int index = 0; index < size; index ++) {                                 \</span>
<span class="new" style="color: blue; font-weight: bold;"> 627         /* placement to call dtor on type */                                        \</span>
<span class="new" style="color: blue; font-weight: bold;"> 628         ((type*)&array_name[index])->~type();                                       \</span>
<span class="new" style="color: blue; font-weight: bold;"> 629       }                                                                             \</span>
<span class="new" style="color: blue; font-weight: bold;"> 630       FREE_C_HEAP_ARRAY(type, array_name, memflags);                                \</span>
<span class="new" style="color: blue; font-weight: bold;"> 631     }                                                                               \</span>
<span class="new" style="color: blue; font-weight: bold;"> 632   }


</span></pre>
    <div class="moz-cite-prefix">I really don't like this, calling dtor 
      ...<br>
      <br>
      Thanks,<br>
      <br>
      -Zhengyu<br>
      <br>
      <br>
      On 4/15/2013 1:41 PM, Yumin Qi wrote:<br>
    </div>
    <blockquote cite="mid:516C3BC8.2040001@oracle.com" type="cite">new
      webrev at:
      <br>
      <br>
      <a class="moz-txt-link-freetext" href="http://cr.openjdk.java.net/~minqi/8010992/webrev2">http://cr.openjdk.java.net/~minqi/8010992/webrev2</a>
      <br>
      <br>
      Can I have a review from GC team for this change?
      <br>
      <br>
      Thanks
      <br>
      Yumin
      <br>
      <br>
      On 4/14/2013 11:07 PM, David Holmes wrote:
      <br>
      <blockquote type="cite">Hi Yumin,
        <br>
        <br>
        On 13/04/2013 7:07 AM, Yumin Qi wrote:
        <br>
        <blockquote type="cite">After take feedback and modify, new
          webrev
          <br>
          <br>
          <a class="moz-txt-link-freetext" href="http://cr.openjdk.java.net/~minqi/8010992/webrev1">http://cr.openjdk.java.net/~minqi/8010992/webrev1</a>
          <br>
          <a class="moz-txt-link-rfc2396E" href="http://cr.openjdk.java.net/%7Eminqi/8010992/webrev1"><http://cr.openjdk.java.net/%7Eminqi/8010992/webrev1></a>
          <br>
        </blockquote>
        <br>
        I still find the HandleMark changes unsatisfactory. The CHeap
        allocated HandleMark in the Thread() constructor is a bit of a
        hack. HandleMarks should be stack-allocated. Plus we seem to
        leak that CHeap allocated HandleMark as we don't keep any
        pointer to it! I think this needs to be re-visited, but as a
        separate CR.
        <br>
        <br>
        ---
        <br>
        <br>
        allocation.hpp:
        <br>
        <br>
        If  NEW_C_HEAP_OBJECT_ARRAY invokes the ctor for each array
        element don't we need a new FREE_C_HEAP_OBJECT_ARRAY to invoke
        the dtor's before deallocating ?
        <br>
        <br>
        ---
        <br>
        <br>
        src/share/vm/utilities/quickSort.cpp
        <br>
        <br>
        Why does only Solaris need the allocation headers included ?? I
        would expect all platforms to need to the same headers here.
        <br>
        <br>
        Thanks,
        <br>
        David
        <br>
        <br>
        <blockquote type="cite">
          <br>
          <br>
          Thanks
          <br>
          Yumin
          <br>
          <br>
          On 4/12/2013 10:45 AM, Zhengyu Gu wrote:
          <br>
          <blockquote type="cite">.
            <br>
            <blockquote type="cite">
              <blockquote type="cite">cardTableModRefBS.cpp
                <br>
                  #87 and #88, why set_start(NULL) are needed?
                <br>
                <br>
              </blockquote>
              This is default constructor does, here just copy that
              code. Since we
              <br>
              did not call constructor by using this MACRO. It is a
              _ValueObj,
              <br>
              should not call new, but I think we can use
              NEW_C_HEAP_OBJ3, which
              <br>
              will call ctors.
              <br>
            </blockquote>
            NEW_C_HEAP_OBJECT_ARRAY macro does invoke ctor ... that is
            what
            <br>
            allocation.hpp #618 does.
            <br>
            <br>
            Thanks,
            <br>
            <br>
            -Zhengyu
            <br>
            <br>
            <br>
            <blockquote type="cite">
              <blockquote type="cite">carTableRS.cpp
                <br>
                  #70, why it is commented out? If so, you don't need
                the dstor
                <br>
                <br>
                <br>
              </blockquote>
              See reply to David H.
              <br>
              <br>
              <br>
              Thanks
              <br>
              Yumin
              <br>
              <blockquote type="cite">-Zhengyu
                <br>
                <br>
                <br>
                <br>
                <br>
                On 4/12/2013 2:12 AM, Yumin Qi wrote:
                <br>
                <blockquote type="cite">Hi,
                  <br>
                  <br>
                    Can I have your inputs for the fix?
                  <br>
                    webrev:
                  <br>
                  <br>
                   <a class="moz-txt-link-freetext" href="http://cr.openjdk.java.net/~minqi/8010992/webrev/">http://cr.openjdk.java.net/~minqi/8010992/webrev/</a>
                  <br>
<a class="moz-txt-link-rfc2396E" href="http://cr.openjdk.java.net/%7Eminqi/8010992/webrev/"><http://cr.openjdk.java.net/%7Eminqi/8010992/webrev/></a>
                  <br>
                  <br>
                    Bug:  8010992: Remove calls to global ::operator
                  new[] and new
                  <br>
                  <a class="moz-txt-link-freetext" href="https://jbs.oracle.com/bugs/browse/JDK-8010992">https://jbs.oracle.com/bugs/browse/JDK-8010992</a>
                  <br>
                  <br>
                  Problem description:  Remove the usage of global
                  operator ::new[]
                  <br>
                  and ::new. In hotspot debug build, disable the usage
                  of global
                  <br>
                  new[] and new.  Hotspot does not throw c++ exceptions,
                  but it
                  <br>
                  cannot prevent third party code to catch such
                  exceptions.  By
                  <br>
                  disabling use of global operator new[] and new, we
                  constrain the
                  <br>
                  exception disposal within hotspot. C++ classes (as
                  same for
                  <br>
                  structs) in hotspot have to either extends from
                  CHeapObj or
                  <br>
                  ResourceObj unless they are stack objects or values
                  which have to
                  <br>
                  be from StackObj or _ValueObj respectively.  Or they
                  have to
                  <br>
                  implement their own operator new[] or new.
                  <br>
                  <br>
                  Thanks
                  <br>
                  Yumin
                  <br>
                  <br>
                  <br>
                </blockquote>
                <br>
              </blockquote>
              <br>
            </blockquote>
            <br>
          </blockquote>
          <br>
        </blockquote>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>