Blob Blame History Raw
diff -r f0d8ef4d9f93 src/os/linux/vm/os_linux.cpp
--- jdk8/hotspot/src/os/linux/vm/os_linux.cpp	Wed Aug 13 15:49:58 2014 +0100
+++ jdk8/hotspot/src/os/linux/vm/os_linux.cpp	Thu Aug 28 09:51:18 2014 +0000
@@ -4843,6 +4843,7 @@
 
   pthread_mutex_init(&dl_mutex, NULL);
 
+NOT_ZERO (
   // If the pagesize of the VM is greater than 8K determine the appropriate
   // number of initial guard pages.  The user can change this with the
   // command line arguments, if needed.
@@ -4851,6 +4852,7 @@
     StackRedPages = 1;
     StackShadowPages = round_to((StackShadowPages*Linux::vm_default_page_size()), vm_page_size()) / vm_page_size();
   }
+ )
 }
 
 // To install functions for atexit system call
@@ -4903,10 +4905,16 @@
   // size.  Add a page for compiler2 recursion in main thread.
   // Add in 2*BytesPerWord times page size to account for VM stack during
   // class initialization depending on 32 or 64 bit VM.
+NOT_ZERO (
   os::Linux::min_stack_allowed = MAX2(os::Linux::min_stack_allowed,
             (size_t)(StackYellowPages+StackRedPages+StackShadowPages) * Linux::page_size() +
                     (2*BytesPerWord COMPILER2_PRESENT(+1)) * Linux::vm_default_page_size());
-
+ )
+ZERO_ONLY (
+ os::Linux::min_stack_allowed = MAX2(os::Linux::min_stack_allowed,           
+            (size_t)(StackYellowPages+StackRedPages+StackShadowPages+
+                     2*BytesPerWord COMPILER2_PRESENT(+1)) * Linux::page_size());
+ )
   size_t threadStackSizeInBytes = ThreadStackSize * K;
   if (threadStackSizeInBytes != 0 &&
       threadStackSizeInBytes < os::Linux::min_stack_allowed) {