456 int os::Linux::get_fpu_control_word(void) { 457 return 0; 458 } 459 460 void os::Linux::set_fpu_control_word(int fpu_control) { 461 } 462 463 // Check that the linux kernel version is 2.4 or higher since earlier 464 // versions do not support SSE without patches. 465 bool os::supports_sse() { 466 return true; 467 } 468 469 bool os::is_allocatable(size_t bytes) { 470 return true; 471 } 472 473 //////////////////////////////////////////////////////////////////////////////// 474 // thread stack 475 476 size_t os::Linux::min_stack_allowed = 64 * K; 477 478 // return default stack size for thr_type 479 size_t os::Linux::default_stack_size(os::ThreadType thr_type) { 480 // default stack size (compiler thread needs larger stack) 481 size_t s = (thr_type == os::compiler_thread ? 4 * M : 1 * M); 482 return s; 483 } 484 485 size_t os::Linux::default_guard_size(os::ThreadType thr_type) { 486 // Creating guard page is very expensive. Java thread has HotSpot 487 // guard page, only enable glibc guard page for non-Java threads. 488 return (thr_type == java_thread ? 0 : page_size()); 489 } 490 491 // Java thread: 492 // 493 // Low memory addresses 494 // +------------------------+ 495 // | |\ JavaThread created by VM does not have glibc 496 // | glibc guard page | - guard, attached Java thread usually has 497 // | |/ 1 page glibc guard. 498 // P1 +------------------------+ Thread::stack_base() - Thread::stack_size() 499 // | |\ | 456 int os::Linux::get_fpu_control_word(void) { 457 return 0; 458 } 459 460 void os::Linux::set_fpu_control_word(int fpu_control) { 461 } 462 463 // Check that the linux kernel version is 2.4 or higher since earlier 464 // versions do not support SSE without patches. 465 bool os::supports_sse() { 466 return true; 467 } 468 469 bool os::is_allocatable(size_t bytes) { 470 return true; 471 } 472 473 //////////////////////////////////////////////////////////////////////////////// 474 // thread stack 475 476 size_t os::Posix::_compiler_thread_min_stack_allowed = 64 * K; 477 size_t os::Posix::_java_thread_min_stack_allowed = 64 * K; 478 size_t os::Posix::_vm_internal_thread_min_stack_allowed = 64 * K; 479 480 // return default stack size for thr_type 481 size_t os::Posix::default_stack_size(os::ThreadType thr_type) { 482 // default stack size (compiler thread needs larger stack) 483 size_t s = (thr_type == os::compiler_thread ? 4 * M : 1 * M); 484 return s; 485 } 486 487 size_t os::Linux::default_guard_size(os::ThreadType thr_type) { 488 // Creating guard page is very expensive. Java thread has HotSpot 489 // guard page, only enable glibc guard page for non-Java threads. 490 return (thr_type == java_thread ? 0 : page_size()); 491 } 492 493 // Java thread: 494 // 495 // Low memory addresses 496 // +------------------------+ 497 // | |\ JavaThread created by VM does not have glibc 498 // | glibc guard page | - guard, attached Java thread usually has 499 // | |/ 1 page glibc guard. 500 // P1 +------------------------+ Thread::stack_base() - Thread::stack_size() 501 // | |\ |