Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
14335:4802ce6fbff6 | 14341:ad3f8397fe37 |
---|---|
805 #endif | 805 #endif |
806 #ifdef TARGET_OS_ARCH_bsd_zero | 806 #ifdef TARGET_OS_ARCH_bsd_zero |
807 # include "os_bsd_zero.hpp" | 807 # include "os_bsd_zero.hpp" |
808 #endif | 808 #endif |
809 | 809 |
810 #ifndef OS_NATIVE_THREAD_CREATION_FAILED_MSG | |
811 #define OS_NATIVE_THREAD_CREATION_FAILED_MSG "unable to create native thread: possibly out of memory or process/resource limits reached" | |
812 #endif | |
813 | |
810 public: | 814 public: |
811 #ifndef PLATFORM_PRINT_NATIVE_STACK | 815 #ifndef PLATFORM_PRINT_NATIVE_STACK |
812 // No platform-specific code for printing the native stack. | 816 // No platform-specific code for printing the native stack. |
813 static bool platform_print_native_stack(outputStream* st, void* context, | 817 static bool platform_print_native_stack(outputStream* st, void* context, |
814 char *buf, int buf_size) { | 818 char *buf, int buf_size) { |
827 static OSReturn get_native_priority(const Thread* const thread, int* priority_ptr); | 831 static OSReturn get_native_priority(const Thread* const thread, int* priority_ptr); |
828 static int java_to_os_priority[CriticalPriority + 1]; | 832 static int java_to_os_priority[CriticalPriority + 1]; |
829 // Hint to the underlying OS that a task switch would not be good. | 833 // Hint to the underlying OS that a task switch would not be good. |
830 // Void return because it's a hint and can fail. | 834 // Void return because it's a hint and can fail. |
831 static void hint_no_preempt(); | 835 static void hint_no_preempt(); |
836 static const char* native_thread_creation_failed_msg() { | |
837 return OS_NATIVE_THREAD_CREATION_FAILED_MSG; | |
838 } | |
832 | 839 |
833 // Used at creation if requested by the diagnostic flag PauseAtStartup. | 840 // Used at creation if requested by the diagnostic flag PauseAtStartup. |
834 // Causes the VM to wait until an external stimulus has been applied | 841 // Causes the VM to wait until an external stimulus has been applied |
835 // (for Unix, that stimulus is a signal, for Windows, an external | 842 // (for Unix, that stimulus is a signal, for Windows, an external |
836 // ResumeThread call) | 843 // ResumeThread call) |