Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/shared/concurrentGCThread.cpp @ 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 | 63a4eb8bcd23 |
children | 4ca6dc0799b6 |
comparison
equal
deleted
inserted
replaced
14335:4802ce6fbff6 | 14341:ad3f8397fe37 |
---|---|
29 #include "oops/oop.inline.hpp" | 29 #include "oops/oop.inline.hpp" |
30 #include "runtime/init.hpp" | 30 #include "runtime/init.hpp" |
31 #include "runtime/interfaceSupport.hpp" | 31 #include "runtime/interfaceSupport.hpp" |
32 #include "runtime/java.hpp" | 32 #include "runtime/java.hpp" |
33 #include "runtime/javaCalls.hpp" | 33 #include "runtime/javaCalls.hpp" |
34 #include "runtime/os.hpp" | |
34 | 35 |
35 // CopyrightVersion 1.2 | 36 // CopyrightVersion 1.2 |
36 | 37 |
37 int ConcurrentGCThread::_CGC_flag = CGC_nil; | 38 int ConcurrentGCThread::_CGC_flag = CGC_nil; |
38 | 39 |
204 // JavaThread due to lack of memory. We would have to throw an exception | 205 // JavaThread due to lack of memory. We would have to throw an exception |
205 // in that case. However, since this must work and we do not allow | 206 // in that case. However, since this must work and we do not allow |
206 // exceptions anyway, check and abort if this fails. | 207 // exceptions anyway, check and abort if this fails. |
207 if (res == NULL || res->osthread() == NULL) { | 208 if (res == NULL || res->osthread() == NULL) { |
208 vm_exit_during_initialization("java.lang.OutOfMemoryError", | 209 vm_exit_during_initialization("java.lang.OutOfMemoryError", |
209 "unable to create new native thread"); | 210 os::native_thread_creation_failed_msg()); |
210 } | 211 } |
211 java_lang_Thread::set_thread(thread_oop(), res); | 212 java_lang_Thread::set_thread(thread_oop(), res); |
212 java_lang_Thread::set_priority(thread_oop(), NearMaxPriority); | 213 java_lang_Thread::set_priority(thread_oop(), NearMaxPriority); |
213 java_lang_Thread::set_daemon(thread_oop()); | 214 java_lang_Thread::set_daemon(thread_oop()); |
214 | 215 |