739 ///////////////////////////////////////////////////////////////////////////////
740 // thread stack
741
742 size_t os::Linux::min_stack_allowed = 128 * K;
743
744 // pthread on Ubuntu is always in floating stack mode
745 bool os::Linux::supports_variable_stack_size() { return true; }
746
747 // return default stack size for thr_type
748 size_t os::Linux::default_stack_size(os::ThreadType thr_type) {
749 // default stack size (compiler thread needs larger stack)
750 size_t s = (thr_type == os::compiler_thread ? 4 * M : 1 * M);
751 return s;
752 }
753
754 size_t os::Linux::default_guard_size(os::ThreadType thr_type) {
755 // Creating guard page is very expensive. Java thread has HotSpot
756 // guard page, only enable glibc guard page for non-Java threads.
757 return (thr_type == java_thread ? 0 : page_size());
758 }
|
739 ///////////////////////////////////////////////////////////////////////////////
740 // thread stack
741
742 size_t os::Linux::min_stack_allowed = 128 * K;
743
744 // pthread on Ubuntu is always in floating stack mode
745 bool os::Linux::supports_variable_stack_size() { return true; }
746
747 // return default stack size for thr_type
748 size_t os::Linux::default_stack_size(os::ThreadType thr_type) {
749 // default stack size (compiler thread needs larger stack)
750 size_t s = (thr_type == os::compiler_thread ? 4 * M : 1 * M);
751 return s;
752 }
753
754 size_t os::Linux::default_guard_size(os::ThreadType thr_type) {
755 // Creating guard page is very expensive. Java thread has HotSpot
756 // guard page, only enable glibc guard page for non-Java threads.
757 return (thr_type == java_thread ? 0 : page_size());
758 }
759
760 #ifndef PRODUCT
761 void os::verify_stack_alignment() {
762 }
763 #endif
|