Print this page
rev 6864 : 8061651: Interface to the Lookup Index Cache to improve URLClassPath search time
Summary: Implemented the interface in sun.misc.URLClassPath and corresponding JVM_XXX APIs
Reviewed-by: mchung, acorn, jiangli, dholmes

Split Split Close
Expand all
Collapse all
          --- old/src/share/vm/memory/metadataFactory.hpp
          +++ new/src/share/vm/memory/metadataFactory.hpp
↓ open down ↓ 56 lines elided ↑ open up ↑
  57   57    static Array<T>* new_writeable_array(ClassLoaderData* loader_data, int length, T value, TRAPS) {
  58   58      Array<T>* array = new_writeable_array<T>(loader_data, length, CHECK_NULL);
  59   59      for (int i = 0; i < length; i++) {
  60   60        array->at_put(i, value);
  61   61      }
  62   62      return array;
  63   63    }
  64   64  
  65   65    template <typename T>
  66   66    static void free_array(ClassLoaderData* loader_data, Array<T>* data) {
       67 +    if (DumpSharedSpaces) {
       68 +      // FIXME: the freeing code is buggy, especially when PrintSharedSpaces is enabled.
       69 +      // Disable for now -- this means if you specify bad classes in your classlist you
       70 +      // may have wasted space inside the archive.
       71 +      return;
       72 +    }
  67   73      if (data != NULL) {
  68   74        assert(loader_data != NULL, "shouldn't pass null");
  69   75        assert(!data->is_shared(), "cannot deallocate array in shared spaces");
  70   76        int size = data->size();
  71   77        if (DumpSharedSpaces) {
  72   78          loader_data->ro_metaspace()->deallocate((MetaWord*)data, size, false);
  73   79        } else {
  74   80          loader_data->metaspace_non_null()->deallocate((MetaWord*)data, size, false);
  75   81        }
  76   82      }
↓ open down ↓ 25 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX