516 517 void os::Linux::init_thread_fpu_state(void) { 518 // Disable FP exceptions. 519 __asm__ __volatile__ ("mtfsfi 6,0"); 520 } 521 522 int os::Linux::get_fpu_control_word(void) { 523 // x86 has problems with FPU precision after pthread_cond_timedwait(). 524 // nothing to do on ppc64. 525 return 0; 526 } 527 528 void os::Linux::set_fpu_control_word(int fpu_control) { 529 // x86 has problems with FPU precision after pthread_cond_timedwait(). 530 // nothing to do on ppc64. 531 } 532 533 //////////////////////////////////////////////////////////////////////////////// 534 // thread stack 535 536 size_t os::Linux::min_stack_allowed = 128*K; 537 538 // return default stack size for thr_type 539 size_t os::Linux::default_stack_size(os::ThreadType thr_type) { 540 // default stack size (compiler thread needs larger stack) 541 // Notice that the setting for compiler threads here have no impact 542 // because of the strange 'fallback logic' in os::create_thread(). 543 // Better set CompilerThreadStackSize in globals_<os_cpu>.hpp if you want to 544 // specify a different stack size for compiler threads! 545 size_t s = (thr_type == os::compiler_thread ? 4 * M : 1024 * K); 546 return s; 547 } 548 549 size_t os::Linux::default_guard_size(os::ThreadType thr_type) { 550 return 2 * page_size(); 551 } 552 553 // Java thread: 554 // 555 // Low memory addresses 556 // +------------------------+ 557 // | |\ JavaThread created by VM does not have glibc 558 // | glibc guard page | - guard, attached Java thread usually has 559 // | |/ 1 page glibc guard. 560 // P1 +------------------------+ Thread::stack_base() - Thread::stack_size() 561 // | |\ 562 // | HotSpot Guard Pages | - red and yellow pages 563 // | |/ 564 // +------------------------+ JavaThread::stack_yellow_zone_base() | 516 517 void os::Linux::init_thread_fpu_state(void) { 518 // Disable FP exceptions. 519 __asm__ __volatile__ ("mtfsfi 6,0"); 520 } 521 522 int os::Linux::get_fpu_control_word(void) { 523 // x86 has problems with FPU precision after pthread_cond_timedwait(). 524 // nothing to do on ppc64. 525 return 0; 526 } 527 528 void os::Linux::set_fpu_control_word(int fpu_control) { 529 // x86 has problems with FPU precision after pthread_cond_timedwait(). 530 // nothing to do on ppc64. 531 } 532 533 //////////////////////////////////////////////////////////////////////////////// 534 // thread stack 535 536 size_t os::Posix::_compiler_thread_min_stack_allowed = 128 * K; 537 size_t os::Posix::_java_thread_min_stack_allowed = 128 * K; 538 size_t os::Posix::_vm_internal_thread_min_stack_allowed = 128 * K; 539 540 // return default stack size for thr_type 541 size_t os::Posix::default_stack_size(os::ThreadType thr_type) { 542 // default stack size (compiler thread needs larger stack) 543 size_t s = (thr_type == os::compiler_thread ? 4 * M : 1024 * K); 544 return s; 545 } 546 547 size_t os::Linux::default_guard_size(os::ThreadType thr_type) { 548 return 2 * page_size(); 549 } 550 551 // Java thread: 552 // 553 // Low memory addresses 554 // +------------------------+ 555 // | |\ JavaThread created by VM does not have glibc 556 // | glibc guard page | - guard, attached Java thread usually has 557 // | |/ 1 page glibc guard. 558 // P1 +------------------------+ Thread::stack_base() - Thread::stack_size() 559 // | |\ 560 // | HotSpot Guard Pages | - red and yellow pages 561 // | |/ 562 // +------------------------+ JavaThread::stack_yellow_zone_base() |