diff src/share/vm/runtime/arguments.cpp @ 6988:2cb439954abf

Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author Gilles Duboscq <duboscq@ssw.jku.at>
date Mon, 19 Nov 2012 15:36:13 +0100
parents e522a00b91aa e4f764ddb06a
children 49f0841607b7
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp	Sun Nov 18 22:45:43 2012 +0100
+++ b/src/share/vm/runtime/arguments.cpp	Mon Nov 19 15:36:13 2012 +0100
@@ -24,6 +24,7 @@
 
 #include "precompiled.hpp"
 #include "classfile/javaAssertions.hpp"
+#include "classfile/symbolTable.hpp"
 #include "compiler/compilerOracle.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/cardTableRS.hpp"
@@ -1862,6 +1863,11 @@
   status = status && verify_percentage(MinHeapFreeRatio, "MinHeapFreeRatio");
   status = status && verify_percentage(MaxHeapFreeRatio, "MaxHeapFreeRatio");
 
+  // Divide by bucket size to prevent a large size from causing rollover when
+  // calculating amount of memory needed to be allocated for the String table.
+  status = status && verify_interval(StringTableSize, defaultStringTableSize,
+    (max_uintx / StringTable::bucket_size()), "StringTable size");
+
   if (MinHeapFreeRatio > MaxHeapFreeRatio) {
     jio_fprintf(defaultStream::error_stream(),
                 "MinHeapFreeRatio (" UINTX_FORMAT ") must be less than or "