comparison src/share/vm/memory/metadataFactory.hpp @ 20375:6e0cb14ce59b

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
author iklam
date Thu, 21 Aug 2014 13:57:51 -0700
parents 2c6ef90f030a
children 4cb90023bf2b
comparison
equal deleted inserted replaced
20374:999824269b71 20375:6e0cb14ce59b
77 } 77 }
78 78
79 // Deallocation method for metadata 79 // Deallocation method for metadata
80 template <class T> 80 template <class T>
81 static void free_metadata(ClassLoaderData* loader_data, T md) { 81 static void free_metadata(ClassLoaderData* loader_data, T md) {
82 if (DumpSharedSpaces) {
83 // FIXME: the freeing code is buggy, especially when PrintSharedSpaces is enabled.
84 // Disable for now -- this means if you specify bad classes in your classlist you
85 // may have wasted space inside the archive.
86 return;
87 }
82 if (md != NULL) { 88 if (md != NULL) {
83 assert(loader_data != NULL, "shouldn't pass null"); 89 assert(loader_data != NULL, "shouldn't pass null");
84 int size = md->size(); 90 int size = md->size();
85 // Call metadata's deallocate function which will call deallocate fields 91 // Call metadata's deallocate function which will call deallocate fields
86 assert(!DumpSharedSpaces, "cannot deallocate metadata when dumping CDS archive"); 92 assert(!DumpSharedSpaces, "cannot deallocate metadata when dumping CDS archive");