--- a/src/hotspot/share/oops/constantPool.cpp Wed Nov 29 18:43:35 2017 -0800
+++ b/src/hotspot/share/oops/constantPool.cpp Tue Nov 28 21:43:45 2017 +0100
@@ -31,6 +31,7 @@
#include "classfile/systemDictionary.hpp"
#include "classfile/vmSymbols.hpp"
#include "interpreter/linkResolver.hpp"
+#include "memory/allocation.inline.hpp"
#include "memory/heapInspection.hpp"
#include "memory/metadataFactory.hpp"
#include "memory/metaspaceClosure.hpp"
@@ -2300,3 +2301,11 @@
}
return NULL;
}
+
+void SymbolHashMap::initialize_table(int table_size) {
+ _table_size = table_size;
+ _buckets = NEW_C_HEAP_ARRAY(SymbolHashMapBucket, table_size, mtSymbol);
+ for (int index = 0; index < table_size; index++) {
+ _buckets[index].clear();
+ }
+}