diff src/share/vm/classfile/symbolTable.hpp @ 6982:e4f764ddb06a

7122219: Passed StringTableSize value not verified Summary: Check that the values specified for -XX:StringTableSize are within a certain range. Reviewed-by: dholmes, coleenp
author hseigel
date Mon, 12 Nov 2012 15:58:11 -0500
parents da91efe96a93
children ede380e13960
line wrap: on
line diff
--- a/src/share/vm/classfile/symbolTable.hpp	Fri Nov 09 22:22:53 2012 -0800
+++ b/src/share/vm/classfile/symbolTable.hpp	Mon Nov 12 15:58:11 2012 -0500
@@ -262,19 +262,14 @@
   // The string table
   static StringTable* the_table() { return _the_table; }
 
+  // Size of one bucket in the string table.  Used when checking for rollover.
+  static uint bucket_size() { return sizeof(HashtableBucket<mtSymbol>); }
+
   static void create_table() {
     assert(_the_table == NULL, "One string table allowed.");
     _the_table = new StringTable();
   }
 
-  static void create_table(HashtableBucket<mtSymbol>* t, int length,
-                           int number_of_entries) {
-    assert(_the_table == NULL, "One string table allowed.");
-    assert((size_t)length == StringTableSize * sizeof(HashtableBucket<mtSymbol>),
-           "bad shared string size.");
-    _the_table = new StringTable(t, number_of_entries);
-  }
-
   // GC support
   //   Delete pointers to otherwise-unreachable objects.
   static void unlink(BoolObjectClosure* cl);