src/share/vm/memory/metadataFactory.hpp
Print this page
rev 6853 : 8046070: Class Data Sharing clean up and refactoring
Summary: Cleaned up CDS to be more configurable, maintainable and extensible
Reviewed-by: dholmes, coleenp, acorn, mchung
@@ -77,10 +77,16 @@
}
// Deallocation method for metadata
template <class T>
static void free_metadata(ClassLoaderData* loader_data, T md) {
+ if (DumpSharedSpaces) {
+ // FIXME: the freeing code is buggy, especially when PrintSharedSpaces is enabled.
+ // Disable for now -- this means if you specify bad classes in your classlist you
+ // may have wasted space inside the archive.
+ return;
+ }
if (md != NULL) {
assert(loader_data != NULL, "shouldn't pass null");
int size = md->size();
// Call metadata's deallocate function which will call deallocate fields
assert(!DumpSharedSpaces, "cannot deallocate metadata when dumping CDS archive");