From a0e8ba6f09b15c5f0737915b5bd723a52113daf0 Mon Sep 17 00:00:00 2001 From: poonam Date: Thu, 4 Oct 2018 19:35:30 +0000 Subject: [PATCH] 8211150: G1 Full GC not purging code root memory and hence causing memory leak Reviewed-by: tschatzl, sjohanss --- src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp index aed811b35..d1ca35e42 100644 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @@ -1464,6 +1464,9 @@ bool G1CollectedHeap::do_collection(bool explicit_gc, // Rebuild the strong code root lists for each region rebuild_strong_code_roots(); + // Purge code root memory + purge_code_root_memory(); + if (true) { // FIXME MetaspaceGC::compute_new_size(); } -- GitLab