8046936: JEP 270: Reserved Stack Areas for Critical Sections

Reviewed-by: acorn, dcubed
This commit is contained in:
Frederic Parain 2015-12-11 09:07:07 -08:00
parent f6440f7fb1
commit ef800bd53f
69 changed files with 987 additions and 64 deletions

View file

@ -4382,6 +4382,7 @@ void os::init(void) {
if (vm_page_size() > 8*K) {
StackYellowPages = 1;
StackRedPages = 1;
StackReservedPages = 1;
StackShadowPages = round_to((StackShadowPages*8*K), vm_page_size()) / vm_page_size();
}
}
@ -4438,7 +4439,7 @@ jint os::init_2(void) {
// Add in 2*BytesPerWord times page size to account for VM stack during
// class initialization depending on 32 or 64 bit VM.
os::Solaris::min_stack_allowed = MAX2(os::Solaris::min_stack_allowed,
(size_t)(StackYellowPages+StackRedPages+StackShadowPages+
(size_t)(StackReservedPages+StackYellowPages+StackRedPages+StackShadowPages+
2*BytesPerWord COMPILER2_PRESENT(+1)) * page_size);
size_t threadStackSizeInBytes = ThreadStackSize * K;