diff -r 0505a797849f src/os/linux/vm/os_linux.cpp
--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp Wed Oct 23 05:23:32 2013 +0100
+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp Thu Oct 24 14:21:47 2013 +0000
@@ -4538,6 +4538,7 @@
initial_time_count = os::elapsed_counter();
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.
@@ -4546,6 +4547,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
@@ -4598,9 +4600,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 &&