< prev index next >

src/hotspot/share/utilities/hashtable.hpp

Print this page

*** 27,36 **** --- 27,37 ---- #include "memory/allocation.hpp" #include "oops/oop.hpp" #include "oops/symbol.hpp" #include "runtime/handles.hpp" + #include "utilities/growableArray.hpp" // This is a generic hashtable, designed to be used for the symbol // and string tables. // // It is implemented as an open hash table with a fixed number of buckets.
*** 143,152 **** --- 144,154 ---- public: BasicHashtable(int table_size, int entry_size); BasicHashtable(int table_size, int entry_size, HashtableBucket<F>* buckets, int number_of_entries); + ~BasicHashtable(); // Bucket handling int hash_to_index(unsigned int full_hash) const { int h = full_hash % _table_size; assert(h >= 0 && h < _table_size, "Illegal hash value");
*** 160,169 **** --- 162,172 ---- BasicHashtableEntry<F>* volatile _free_list; char* _first_free_entry; char* _end_block; int _entry_size; volatile int _number_of_entries; + GrowableArray<char*>* _entry_blocks; protected: void initialize(int table_size, int entry_size, int number_of_entries);
*** 289,300 **** }; // A subclass of BasicHashtable that allows you to do a simple K -> V mapping // without using tons of boilerplate code. template< ! typename K, typename V, ! MEMFLAGS F = mtInternal, unsigned (*HASH) (K const&) = primitive_hash<K>, bool (*EQUALS)(K const&, K const&) = primitive_equals<K> > class KVHashtable : public BasicHashtable<F> { class KVHashtableEntry : public BasicHashtableEntry<F> { --- 292,302 ---- }; // A subclass of BasicHashtable that allows you to do a simple K -> V mapping // without using tons of boilerplate code. template< ! typename K, typename V, MEMFLAGS F, unsigned (*HASH) (K const&) = primitive_hash<K>, bool (*EQUALS)(K const&, K const&) = primitive_equals<K> > class KVHashtable : public BasicHashtable<F> { class KVHashtableEntry : public BasicHashtableEntry<F> {
< prev index next >