Don't forget, too, that in the face of JSR 277 the guys at Sun are going to be very reluctant to change anything ClassLoader-related at this point. Maybe for Java 8, but don't hold your breath.
Ted Neward Java, .NET, XML Services Consulting, Teaching, Speaking, Writing http://www.tedneward.com > -----Original Message----- > From: [email protected] [mailto:jvm- > [EMAIL PROTECTED] On Behalf Of Attila Szegedi > Sent: Monday, January 14, 2008 5:51 AM > To: [email protected] > Subject: [jvm-l] Re: Ability to force class unloading in JDK 6 Update > 4? > > > > On 2008.01.14., at 14:26, Matthias Ernst wrote: > > > > > On Jan 14, 2008 2:06 PM, Kresten Krab Thorup <[EMAIL PROTECTED]> > wrote: > >> > >> I think that the best way to improve this would be to add a new kind > >> of class loader that would permit unloading classes loaded by it. > >> That would relieve us from creating a new class loader for every > >> class > >> that needs to be independently unloaded (such as compiled methods). > > > > Is the overhead substantial for individual class loaders apart from > > the Java heap? Do they > > live in the permgen? Do they complicate the verification algorithm? > > Has anyone investigated that? > > No, they don't really complicate anything as far as I know. They don't > live in permgen. They're just ordinary Java objects usually referenced > from Class objects and Thread objects, and can be GCed (except for > system class loader). > > They do have a bit of a memory footprint -- in addition to their own > fields, each does create one 16-element hashset, one 16-element > hashmap, one 11-element hashmap, and one 10-element vector. > > Rhino uses the classloader-per-function scheme since forever and it's > never been a big deal. I do agree that it'd be nice if there existed > an atomically loadable/unloadable unit of code in JVM that's lighter > than the currently only possible "Method-in-a-Class-in-a-ClassLoader", > even just because it'd make this rather baroque construct no longer > necessary, but even the current situation itself is, well, tolerable. > > Attila. > > -- > home: http://www.szegedi.org > weblog: http://constc.blogspot.com > > > > > > > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.516 / Virus Database: 269.19.2/1222 - Release Date: > 1/13/2008 12:23 PM > No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.19.2/1222 - Release Date: 1/13/2008 12:23 PM --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---
