< prev index next >

src/hotspot/share/memory/metadataFactory.hpp

Print this page
*** 46,10 ***
--- 46,17 ---
        array->at_put(i, value);
      }
      return array;
    }
  
+   // Work-around -- see JDK-8331086.
+   // This API should be used for TrainingData only.
+   template <typename T>
+   static Array<T>* new_array_from_c_heap(int length, MemTag flags) {
+     return new (length, flags) Array<T>(length);
+   }
+ 
    template <typename T>
    static void free_array(ClassLoaderData* loader_data, Array<T>* data) {
      if (data != nullptr) {
        assert(loader_data != nullptr, "shouldn't pass null");
        assert(!data->is_shared(), "cannot deallocate array in shared spaces");
< prev index next >