hotspot/src/share/vm/utilities/debug.cpp
changeset 28476 ae1ca3bf45ca
parent 27404 33c0f343cd5c
child 28477 157314902d78
--- a/hotspot/src/share/vm/utilities/debug.cpp	Mon Jan 12 09:27:52 2015 +0100
+++ b/hotspot/src/share/vm/utilities/debug.cpp	Mon Jan 12 11:37:58 2015 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -273,6 +273,14 @@
    exit(2);
 }
 
+void report_insufficient_metaspace(size_t required_size) {
+  warning("\nThe MaxMetaspaceSize of " UINTX_FORMAT " bytes is not large enough.\n"
+          "Either don't specify the -XX:MaxMetaspaceSize=<size>\n"
+          "or increase the size to at least " SIZE_FORMAT ".\n",
+          MaxMetaspaceSize, required_size);
+  exit(2);
+}
+
 void report_java_out_of_memory(const char* message) {
   static jint out_of_memory_reported = 0;