comparison 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
comparison
equal deleted inserted replaced
6981:8c413497f434 6982:e4f764ddb06a
260 number_of_entries) {} 260 number_of_entries) {}
261 public: 261 public:
262 // The string table 262 // The string table
263 static StringTable* the_table() { return _the_table; } 263 static StringTable* the_table() { return _the_table; }
264 264
265 // Size of one bucket in the string table. Used when checking for rollover.
266 static uint bucket_size() { return sizeof(HashtableBucket<mtSymbol>); }
267
265 static void create_table() { 268 static void create_table() {
266 assert(_the_table == NULL, "One string table allowed."); 269 assert(_the_table == NULL, "One string table allowed.");
267 _the_table = new StringTable(); 270 _the_table = new StringTable();
268 }
269
270 static void create_table(HashtableBucket<mtSymbol>* t, int length,
271 int number_of_entries) {
272 assert(_the_table == NULL, "One string table allowed.");
273 assert((size_t)length == StringTableSize * sizeof(HashtableBucket<mtSymbol>),
274 "bad shared string size.");
275 _the_table = new StringTable(t, number_of_entries);
276 } 271 }
277 272
278 // GC support 273 // GC support
279 // Delete pointers to otherwise-unreachable objects. 274 // Delete pointers to otherwise-unreachable objects.
280 static void unlink(BoolObjectClosure* cl); 275 static void unlink(BoolObjectClosure* cl);