src/os/linux/vm/os_linux.cpp

Print this page

        

*** 1897,1907 **** if (!_stack_is_executable) { JavaThread *jt = Threads::first(); while (jt) { if (!jt->stack_guard_zone_unused() && // Stack not yet fully initialized ! jt->stack_yellow_zone_enabled()) { // No pending stack overflow exceptions if (!os::guard_memory((char *) jt->stack_red_zone_base() - jt->stack_red_zone_size(), jt->stack_yellow_zone_size() + jt->stack_red_zone_size())) { warning("Attempt to reguard stack yellow zone failed."); } } --- 1897,1907 ---- if (!_stack_is_executable) { JavaThread *jt = Threads::first(); while (jt) { if (!jt->stack_guard_zone_unused() && // Stack not yet fully initialized ! jt->stack_guards_enabled()) { // No pending stack overflow exceptions if (!os::guard_memory((char *) jt->stack_red_zone_base() - jt->stack_red_zone_size(), jt->stack_yellow_zone_size() + jt->stack_red_zone_size())) { warning("Attempt to reguard stack yellow zone failed."); } }
*** 4646,4655 **** --- 4646,4660 ---- // number of initial guard pages. The user can change this with the // command line arguments, if needed. if (vm_page_size() > (int)Linux::vm_default_page_size()) { StackYellowPages = 1; StackRedPages = 1; + #if defined(IA32) || defined(IA64) + StackReservedPages = 1; + #else + StackReservedPages = 0; + #endif StackShadowPages = round_to((StackShadowPages*Linux::vm_default_page_size()), vm_page_size()) / vm_page_size(); } // retrieve entry point for pthread_setname_np Linux::_pthread_setname_np =
*** 4707,4717 **** // the java system classes, including StackOverflowError - depends on page // 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. 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()); size_t threadStackSizeInBytes = ThreadStackSize * K; if (threadStackSizeInBytes != 0 && threadStackSizeInBytes < os::Linux::min_stack_allowed) { --- 4712,4722 ---- // the java system classes, including StackOverflowError - depends on page // 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. os::Linux::min_stack_allowed = MAX2(os::Linux::min_stack_allowed, ! (size_t)(StackReservedPages+StackYellowPages+StackRedPages+StackShadowPages) * Linux::page_size() + (2*BytesPerWord COMPILER2_PRESENT(+1)) * Linux::vm_default_page_size()); size_t threadStackSizeInBytes = ThreadStackSize * K; if (threadStackSizeInBytes != 0 && threadStackSizeInBytes < os::Linux::min_stack_allowed) {