src/share/vm/memory/metadataFactory.hpp

changeset 7089
6e0cb14ce59b
parent 6992
2c6ef90f030a
child 7322
4cb90023bf2b
equal deleted inserted replaced
7088:999824269b71 7089: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");

mercurial