Yes the PermGen issue in general seems a major weakness of the "Sun" VM (now OpenJDK) - although its not an intractable problem - just an irritation.
It seems an out dated idea today to have a separate space/special rules for generated code versus the rest of the heap - I think other VMs like JRockit didn't do that and didn't have that issue.
Although - I think the class/classloader relationship is in the spec, so to allow easy GC of generated classes you need to have 1 to 1 with classloaders (I hear that all this is going to change anyway to reflect how people really use things).
Comments
Yes the PermGen issue in general seems a major weakness of the "Sun" VM (now OpenJDK) - although its not an intractable problem - just an irritation.
It seems an out dated idea today to have a separate space/special rules for generated code versus the rest of the heap - I think other VMs like JRockit didn't do that and didn't have that issue.
Although - I think the class/classloader relationship is in the spec, so to allow easy GC of generated classes you need to have 1 to 1 with classloaders (I hear that all this is going to change anyway to reflect how people really use things).