<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    Please review this simple code change that fixes a memory leak
    during the G1 Full GC cycle.<br>
    <br>
    <a moz-do-not-send="true"
      href="https://bugs.openjdk.java.net/browse/JDK-8211150">JDK-8211150</a>:
    G1 Full GC not purging code root memory and hence causing memory
    leak<br>
    <br>
    Webrev: <a class="moz-txt-link-freetext" href="http://cr.openjdk.java.net/~poonam/8211150/webrev/">http://cr.openjdk.java.net/~poonam/8211150/webrev/</a><br>
    <br>
    Problem and fix: During G1 Full collections, the code root memory is
    not being deallocated, and that causes a leak for processes invoking
    only Full GCs (e.g. using System.gc()). The above change fixes that
    leak. Please see the attached images showing the memory allocations
    of a process creating lots of Thread objects and invoking
    System.gc(), before and after this fix. The allocations profile is
    collected using jemalloc. Before-fix image clearly shows that the
    new entries created in G1CodeRootSetTableEntry are not being deleted
    in Full collections.<br>
    <br>
    Thanks,<br>
    Poonam<br>
    <br>
  </body>
</html>