RR(S): 8020943: Memory leak when GCNotifier uses create_from_platform_dependent_str()

frederic parain frederic.parain at oracle.com
Wed Jul 31 10:54:05 UTC 2013


Looks good to me.

Minot nit: Copyright year update line 2

Fred (not a Reviewer)

On 31/07/2013 11:45, Kevin Walls wrote:
> Hi,
>
> I'd like to get a review on this small change:
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8020943
> https://jbs.oracle.com/bugs/browse/JDK-8020943
>
> webrev
> http://cr.openjdk.java.net/~kevinw/8020943/webrev.00/
>
> It turns out there's a leak in the gc notifier: reproduce by attaching
> e.g. JConsole and watching, if there is frequent GC the number of
> apparently unowned String objects that can't get collect continually
> increases.
>
> In the notifier, the method it calls to create String objects involves a
> JNI call that leaves a Handle behind and doesn't get cleared.   There is
> a simpler method to call, there is no need for all that work, as we are
> dealing with a small set of simple strings in the JVM being converted,
> to describe the collection type, cause, ...
>
> Thanks
> Kevin

-- 
Frederic Parain - Oracle
Grenoble Engineering Center - France
Phone: +33 4 76 18 81 17
Email: Frederic.Parain at oracle.com



More information about the hotspot-gc-dev mailing list