< prev index next >

src/os_cpu/linux_x86/vm/os_linux_x86.cpp

Print this page
rev 12307 : 8169373: Work around linux NPTL stack guard error.
Summary: Also streamline OS guard page handling on linuxs390, linuxppc, aixppc.
rev 12308 : imported patch new_os_guard_for_java_thread.patch

@@ -675,19 +675,19 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // thread stack
 
-#ifdef AMD64
-size_t os::Posix::_compiler_thread_min_stack_allowed = 64 * K;
-size_t os::Posix::_java_thread_min_stack_allowed = 64 * K;
+// Minimum usable stack sizes required to get to user code. Space for VM
+// guard pages is added later.
+size_t os::Posix::_compiler_thread_min_stack_allowed = 48 * K;
+size_t os::Posix::_java_thread_min_stack_allowed = 40 * K;
+#ifdef _LP64
 size_t os::Posix::_vm_internal_thread_min_stack_allowed = 64 * K;
 #else
-size_t os::Posix::_compiler_thread_min_stack_allowed = (48 DEBUG_ONLY(+ 4)) * K;
-size_t os::Posix::_java_thread_min_stack_allowed = (48 DEBUG_ONLY(+ 4)) * K;
 size_t os::Posix::_vm_internal_thread_min_stack_allowed = (48 DEBUG_ONLY(+ 4)) * K;
-#endif // AMD64
+#endif // _LP64
 
 // return default stack size for thr_type
 size_t os::Posix::default_stack_size(os::ThreadType thr_type) {
   // default stack size (compiler thread needs larger stack)
 #ifdef AMD64

@@ -699,11 +699,11 @@
 }
 
 size_t os::Linux::default_guard_size(os::ThreadType thr_type) {
   // Creating guard page is very expensive. Java thread has HotSpot
   // guard page, only enable glibc guard page for non-Java threads.
-  return (thr_type == java_thread ? 0 : page_size());
+  return ((thr_type == java_thread || thr_type == os::compiler_thread) ? 0 : page_size());
 }
 
 // Java thread:
 //
 //   Low memory addresses
< prev index next >