-
Bug
-
Resolution: Fixed
-
P3
-
8
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8009942 | 8 | Stefan Karlsson | P3 | Closed | Fixed | b81 |
Before the PermGen removal a class loader could be garbage collected by a young GC if it didn't load any classes and all references to it were dropped.
After the PermGen removal, there's an unnecessary call to register_loader in the SystemDictionary::find(...) function:
ClassLoaderData* loader_data = register_loader(class_loader, CHECK_NULL);
which prevents these kind of class loader from being garbage collected by the young GCs.
Fortunately, we don't have to register a ClassLoaderData for the class loader in the find(...) function. The rational is that if we haven't already setup a ClassLoaderData for the class loader, then it won't have an entry in the dictionary, and we can safely return NULL.
This bug is one of the reasons for the memory footprint regressions seen in:
JDK-8001590: NPG: Footprint increase when running Jetty
After the PermGen removal, there's an unnecessary call to register_loader in the SystemDictionary::find(...) function:
ClassLoaderData* loader_data = register_loader(class_loader, CHECK_NULL);
which prevents these kind of class loader from being garbage collected by the young GCs.
Fortunately, we don't have to register a ClassLoaderData for the class loader in the find(...) function. The rational is that if we haven't already setup a ClassLoaderData for the class loader, then it won't have an entry in the dictionary, and we can safely return NULL.
This bug is one of the reasons for the memory footprint regressions seen in:
- backported by
-
JDK-8009942 NPG: SystemDictionary::find(...) unnecessarily keeps class loaders alive
-
- Closed
-
- relates to
-
JDK-8001590 NPG: Footprint increase when running Jetty
-
- Closed
-