RFR: JDK-8211150: G1 Full GC not purging code root memory and hence causing memory leak
Poonam Parhar
poonam.bajaj at oracle.com
Mon Oct 1 16:39:45 UTC 2018
Hello,
Please review this simple code change that fixes a memory leak during
the G1 Full GC cycle.
JDK-8211150 <https://bugs.openjdk.java.net/browse/JDK-8211150>: G1 Full
GC not purging code root memory and hence causing memory leak
Webrev: http://cr.openjdk.java.net/~poonam/8211150/webrev/
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.
Thanks,
Poonam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20181001/6486f8b7/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 12_afterfix.png
Type: image/png
Size: 227982 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20181001/6486f8b7/12_afterfix.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 12_beforefix.png
Type: image/png
Size: 224734 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20181001/6486f8b7/12_beforefix.png>
More information about the hotspot-gc-dev
mailing list