diff src/share/vm/classfile/symbolTable.hpp @ 2378:924777755fad

6962930: make the string table size configurable Reviewed-by: never, phh, stefank, kamg, dholmes, coleenp
author jcoomes
date Mon, 21 Mar 2011 18:38:00 -0700
parents 3582bf76420e
children 352622fd140a
line wrap: on
line diff
--- a/src/share/vm/classfile/symbolTable.hpp	Mon Mar 21 14:06:50 2011 -0700
+++ b/src/share/vm/classfile/symbolTable.hpp	Mon Mar 21 18:38:00 2011 -0700
@@ -216,18 +216,14 @@
   oop basic_add(int index, Handle string_or_null, jchar* name, int len,
                 unsigned int hashValue, TRAPS);
 
-  // Table size
-  enum {
-    string_table_size = 1009
-  };
-
   oop lookup(int index, jchar* chars, int length, unsigned int hashValue);
 
-  StringTable() : Hashtable<oop>(string_table_size, sizeof (HashtableEntry<oop>)) {}
+  StringTable() : Hashtable<oop>((int)StringTableSize,
+                                 sizeof (HashtableEntry<oop>)) {}
 
   StringTable(HashtableBucket* t, int number_of_entries)
-    : Hashtable<oop>(string_table_size, sizeof (HashtableEntry<oop>), t,
-                number_of_entries) {}
+    : Hashtable<oop>((int)StringTableSize, sizeof (HashtableEntry<oop>), t,
+                     number_of_entries) {}
 
 public:
   // The string table
@@ -241,7 +237,7 @@
   static void create_table(HashtableBucket* t, int length,
                            int number_of_entries) {
     assert(_the_table == NULL, "One string table allowed.");
-    assert(length == string_table_size * sizeof(HashtableBucket),
+    assert((size_t)length == StringTableSize * sizeof(HashtableBucket),
            "bad shared string size.");
     _the_table = new StringTable(t, number_of_entries);
   }