diff -r 27e4ea99855d -r 3582bf76420e src/share/vm/utilities/debug.cpp --- a/src/share/vm/utilities/debug.cpp Thu Jan 27 13:42:28 2011 -0800 +++ b/src/share/vm/utilities/debug.cpp Thu Jan 27 16:11:27 2011 -0800 @@ -263,6 +263,27 @@ #endif // PRODUCT } +void report_out_of_shared_space(SharedSpaceType shared_space) { + static const char* name[] = { + "permanent generation", + "shared read only space", + "shared read write space", + "shared miscellaneous data space" + }; + static const char* flag[] = { + "PermGen", + "SharedReadOnlySize", + "SharedReadWriteSize", + "SharedMiscDataSize" + }; + + warning("\nThe %s is not large enough\n" + "to preload requested classes. Use -XX:%s=\n" + "to increase the initial size of %s.\n", + name[shared_space], flag[shared_space], name[shared_space]); + exit(2); +} + void report_java_out_of_memory(const char* message) { static jint out_of_memory_reported = 0;