diff src/share/vm/runtime/os.hpp @ 14341:ad3f8397fe37

7182040: volano29 limited by os resource on Linux - need better diagnostic message Summary: Changed message to "unable to create native thread: possibly out of memory or process/resource limits reached" Reviewed-by: dholmes, sla
author iklam
date Tue, 11 Feb 2014 08:43:17 -0800
parents 2c95095271e9
children 8a9bb7821e28 6c9332549827
line wrap: on
line diff
--- a/src/share/vm/runtime/os.hpp	Mon Feb 10 17:49:17 2014 +0100
+++ b/src/share/vm/runtime/os.hpp	Tue Feb 11 08:43:17 2014 -0800
@@ -807,6 +807,10 @@
 # include "os_bsd_zero.hpp"
 #endif
 
+#ifndef OS_NATIVE_THREAD_CREATION_FAILED_MSG
+#define OS_NATIVE_THREAD_CREATION_FAILED_MSG "unable to create native thread: possibly out of memory or process/resource limits reached"
+#endif
+
  public:
 #ifndef PLATFORM_PRINT_NATIVE_STACK
   // No platform-specific code for printing the native stack.
@@ -829,6 +833,9 @@
   // Hint to the underlying OS that a task switch would not be good.
   // Void return because it's a hint and can fail.
   static void hint_no_preempt();
+  static const char* native_thread_creation_failed_msg() {
+    return OS_NATIVE_THREAD_CREATION_FAILED_MSG;
+  }
 
   // Used at creation if requested by the diagnostic flag PauseAtStartup.
   // Causes the VM to wait until an external stimulus has been applied