<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    I've fixed the CMS case and updated the webrev.<br>
    <br>
    <a class="moz-txt-link-freetext" href="http://cr.openjdk.java.net/~jmasa/8025635/webrev.01/">http://cr.openjdk.java.net/~jmasa/8025635/webrev.01/</a><br>
    <br>
    With the fix an unneeded call to expand_and_allocate() may be<br>
    made for CMS.  I chose to keep the code simpler rather<br>
    than to treat that CMS case.<br>
    <br>
    While working on this change I decided that a CMS concurrent<br>
    cycle could be started inappropriately (after a STW full GC or<br>
    after a foreground CMS collection) and have filed <br>
    <br>
    8026752: Cancel MetaspaceGC request for a concurrent collection
    after GC<br>
    <br>
    See that CR for comments on the CMS behavior regarding collections
    for<br>
    Metaspace allocations.<br>
    <br>
    Jon<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 10/3/13 3:44 PM, Jon Masamitsu
      wrote:<br>
    </div>
    <blockquote cite="mid:524DF358.8040505@oracle.com" type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      8025635: SoftReferences are not cleared before metaspace OOME are
      thrown<br>
      <br>
      If native memory has been exhausted or MaxMetaspaceSize has been
      set and<br>
      has been reached, a GC will be done to try and unload classes and
      free metadata<br>
      space.  If not enough metadata space has been freed, another GC
      which clears<br>
      SoftReferences will be done.<br>
      <br>
      Note that GC's are normally done to unload classes and free
      metadata space.<br>
      If not enough metadata space is freed by the GC, additional<br>
      space is allocated and used for the metadata allocation.  It is
      only in<br>
      the situation where no additional native memory can be allocated
      for<br>
      metadata that SoftReferences are cleared.<br>
      <br>
      <a moz-do-not-send="true" class="moz-txt-link-freetext"
        href="http://cr.openjdk.java.net/%7Ejmasa/8025635/webrev.00/">http://cr.openjdk.java.net/~jmasa/8025635/webrev.00/</a>
    </blockquote>
    <br>
  </body>
</html>