1.1 --- a/src/share/vm/utilities/debug.cpp Thu Jan 27 13:42:28 2011 -0800 1.2 +++ b/src/share/vm/utilities/debug.cpp Thu Jan 27 16:11:27 2011 -0800 1.3 @@ -263,6 +263,27 @@ 1.4 #endif // PRODUCT 1.5 } 1.6 1.7 +void report_out_of_shared_space(SharedSpaceType shared_space) { 1.8 + static const char* name[] = { 1.9 + "permanent generation", 1.10 + "shared read only space", 1.11 + "shared read write space", 1.12 + "shared miscellaneous data space" 1.13 + }; 1.14 + static const char* flag[] = { 1.15 + "PermGen", 1.16 + "SharedReadOnlySize", 1.17 + "SharedReadWriteSize", 1.18 + "SharedMiscDataSize" 1.19 + }; 1.20 + 1.21 + warning("\nThe %s is not large enough\n" 1.22 + "to preload requested classes. Use -XX:%s=\n" 1.23 + "to increase the initial size of %s.\n", 1.24 + name[shared_space], flag[shared_space], name[shared_space]); 1.25 + exit(2); 1.26 +} 1.27 + 1.28 void report_java_out_of_memory(const char* message) { 1.29 static jint out_of_memory_reported = 0; 1.30