Re: RFR 8151486 : Class.forName causes memory leak

2016-10-07 Thread Mandy Chung
> On Oct 7, 2016, at 11:25 AM, Brent Christian > wrote: > > On 10/5/16 4:43 PM, David Holmes wrote: >>> Okay but this will still affect the lifecycle of the PDs because without the strong reference in L, those weak references in the VM will quickly

Re: RFR 8151486 : Class.forName causes memory leak

2016-10-07 Thread Brent Christian
On 10/5/16 4:43 PM, David Holmes wrote: Okay but this will still affect the lifecycle of the PDs because without the strong reference in L, those weak references in the VM will quickly be cleared. There's also a strong reference held by the Class object itself (on the VM side [1]). Thanks

Re: RFR 8151486 : Class.forName causes memory leak

2016-10-05 Thread David Holmes
On 6/10/2016 9:19 AM, Mandy Chung wrote: On Oct 5, 2016, at 4:02 PM, David Holmes wrote: On 6/10/2016 8:55 AM, Mandy Chung wrote: Note that PD is the protection domain of an initiating class that resolves a target type T. PD is kept in T’s class loader L. It’s

Re: RFR 8151486 : Class.forName causes memory leak

2016-10-05 Thread Mandy Chung
> On Oct 5, 2016, at 4:02 PM, David Holmes wrote: > > On 6/10/2016 8:55 AM, Mandy Chung wrote: >> >> >> Note that PD is the protection domain of an initiating class that resolves a >> target type T. PD is kept in T’s class loader L. It’s not the protection >>

Re: RFR 8151486 : Class.forName causes memory leak

2016-10-05 Thread David Holmes
On 6/10/2016 8:55 AM, Mandy Chung wrote: On Oct 5, 2016, at 2:26 PM, David Holmes wrote: On 6/10/2016 6:19 AM, Mandy Chung wrote: Since domains is not used and not intended to keep PD alive and VM maintains its own cache of these initiating PD for performance,

Re: RFR 8151486 : Class.forName causes memory leak

2016-10-05 Thread Mandy Chung
> On Oct 5, 2016, at 2:26 PM, David Holmes wrote: > > On 6/10/2016 6:19 AM, Mandy Chung wrote: >> >> >> Since domains is not used and not intended to keep PD alive and VM maintains >> its own cache of these initiating PD for performance, removing domains field >>

Re: RFR 8151486 : Class.forName causes memory leak

2016-10-05 Thread Brent Christian
Yes! Good catch, thanks. -Brent On 10/5/16 2:08 PM, Naoto Sato wrote: Typo in ClassForNameLeak.java? At line 103, "change" -> "chance"? Naoto On 10/5/16 12:38 PM, Brent Christian wrote: Hi, Please review my fix for 8151486, "Class.forName causes memory leak". Bug:

Re: RFR 8151486 : Class.forName causes memory leak

2016-10-05 Thread David Holmes
On 6/10/2016 6:19 AM, Mandy Chung wrote: On Oct 5, 2016, at 12:38 PM, Brent Christian wrote: Hi, Please review my fix for 8151486, "Class.forName causes memory leak". Bug: https://bugs.openjdk.java.net/browse/JDK-8151486 Webrev:

Re: RFR 8151486 : Class.forName causes memory leak

2016-10-05 Thread Naoto Sato
Typo in ClassForNameLeak.java? At line 103, "change" -> "chance"? Naoto On 10/5/16 12:38 PM, Brent Christian wrote: Hi, Please review my fix for 8151486, "Class.forName causes memory leak". Bug: https://bugs.openjdk.java.net/browse/JDK-8151486 Webrev:

Re: RFR 8151486 : Class.forName causes memory leak

2016-10-05 Thread Mandy Chung
> On Oct 5, 2016, at 12:38 PM, Brent Christian > wrote: > > Hi, > > Please review my fix for 8151486, "Class.forName causes memory leak". > > Bug: > https://bugs.openjdk.java.net/browse/JDK-8151486 > Webrev: >

RFR 8151486 : Class.forName causes memory leak

2016-10-05 Thread Brent Christian
Hi, Please review my fix for 8151486, "Class.forName causes memory leak". Bug: https://bugs.openjdk.java.net/browse/JDK-8151486 Webrev: http://cr.openjdk.java.net/~bchristi/8151486/webrev.00/ The test case reproduces the bug as such: With a SecurityManager enabled, a class ("ClassForName") is