hotspot/src/share/vm/runtime/arguments.cpp
changeset 18700 293625ae06a2
parent 18510 b4df166cc411
child 18702 e6fa43c6d215
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Mon Jul 08 14:15:02 2013 -0700
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Tue Jul 09 11:48:05 2013 +0200
@@ -1855,8 +1855,13 @@
                 "please refer to the release notes for the combinations "
                 "allowed\n");
     status = false;
+  } else if (ReservedCodeCacheSize > 2*G) {
+    // Code cache size larger than MAXINT is not supported.
+    jio_fprintf(defaultStream::error_stream(),
+                "Invalid ReservedCodeCacheSize=%dM. Must be at most %uM.\n", ReservedCodeCacheSize/M,
+                (2*G)/M);
+    status = false;
   }
-
   return status;
 }
 
@@ -2239,8 +2244,13 @@
                 "Invalid ReservedCodeCacheSize=%dK. Must be at least %uK.\n", ReservedCodeCacheSize/K,
                 min_code_cache_size/K);
     status = false;
+  } else if (ReservedCodeCacheSize > 2*G) {
+    // Code cache size larger than MAXINT is not supported.
+    jio_fprintf(defaultStream::error_stream(),
+                "Invalid ReservedCodeCacheSize=%dM. Must be at most %uM.\n", ReservedCodeCacheSize/M,
+                (2*G)/M);
+    status = false;
   }
-
   return status;
 }