comparison src/os/solaris/vm/os_solaris.cpp @ 1867:b6aedd1acdc0

6983240: guarantee((Solaris::min_stack_allowed >= (StackYellowPages+StackRedPages...) wrong Summary: min_stack_allowed is a compile time constant and Stack*Pages are settable Reviewed-by: dholmes, kvn
author coleenp
date Thu, 07 Oct 2010 08:06:06 -0700
parents 1c352af0135d
children 22260322f0be
comparison
equal deleted inserted replaced
1866:644f98c78e33 1867:b6aedd1acdc0
4876 FLAG_SET_DEFAULT(UseLargePages, os::large_page_init()); 4876 FLAG_SET_DEFAULT(UseLargePages, os::large_page_init());
4877 4877
4878 // Check minimum allowable stack size for thread creation and to initialize 4878 // Check minimum allowable stack size for thread creation and to initialize
4879 // the java system classes, including StackOverflowError - depends on page 4879 // the java system classes, including StackOverflowError - depends on page
4880 // size. Add a page for compiler2 recursion in main thread. 4880 // size. Add a page for compiler2 recursion in main thread.
4881 // Add in BytesPerWord times page size to account for VM stack during 4881 // Add in 2*BytesPerWord times page size to account for VM stack during
4882 // class initialization depending on 32 or 64 bit VM. 4882 // class initialization depending on 32 or 64 bit VM.
4883 guarantee((Solaris::min_stack_allowed >= 4883 os::Solaris::min_stack_allowed = MAX2(os::Solaris::min_stack_allowed,
4884 (StackYellowPages+StackRedPages+StackShadowPages+BytesPerWord 4884 (size_t)(StackYellowPages+StackRedPages+StackShadowPages+
4885 COMPILER2_PRESENT(+1)) * page_size), 4885 2*BytesPerWord COMPILER2_PRESENT(+1)) * page_size);
4886 "need to increase Solaris::min_stack_allowed on this platform");
4887 4886
4888 size_t threadStackSizeInBytes = ThreadStackSize * K; 4887 size_t threadStackSizeInBytes = ThreadStackSize * K;
4889 if (threadStackSizeInBytes != 0 && 4888 if (threadStackSizeInBytes != 0 &&
4890 threadStackSizeInBytes < Solaris::min_stack_allowed) { 4889 threadStackSizeInBytes < os::Solaris::min_stack_allowed) {
4891 tty->print_cr("\nThe stack size specified is too small, Specify at least %dk", 4890 tty->print_cr("\nThe stack size specified is too small, Specify at least %dk",
4892 Solaris::min_stack_allowed/K); 4891 os::Solaris::min_stack_allowed/K);
4893 return JNI_ERR; 4892 return JNI_ERR;
4894 } 4893 }
4895 4894
4896 // For 64kbps there will be a 64kb page size, which makes 4895 // For 64kbps there will be a 64kb page size, which makes
4897 // the usable default stack size quite a bit less. Increase the 4896 // the usable default stack size quite a bit less. Increase the