< prev index next >

src/share/vm/runtime/thread.hpp

Print this page

        

*** 1410,1420 **** static size_t stack_red_zone_size() { assert(_stack_red_zone_size > 0, "Don't call this before the field is initialized."); return _stack_red_zone_size; } static void set_stack_red_zone_size(size_t s) { ! assert(is_size_aligned(s, os::vm_page_size()), "We can not protect if the red zone size is not page aligned."); assert(_stack_red_zone_size == 0, "This should be called only once."); _stack_red_zone_size = s; } address stack_red_zone_base() { --- 1410,1420 ---- static size_t stack_red_zone_size() { assert(_stack_red_zone_size > 0, "Don't call this before the field is initialized."); return _stack_red_zone_size; } static void set_stack_red_zone_size(size_t s) { ! assert(is_aligned(s, os::vm_page_size()), "We can not protect if the red zone size is not page aligned."); assert(_stack_red_zone_size == 0, "This should be called only once."); _stack_red_zone_size = s; } address stack_red_zone_base() {
*** 1427,1448 **** static size_t stack_yellow_zone_size() { assert(_stack_yellow_zone_size > 0, "Don't call this before the field is initialized."); return _stack_yellow_zone_size; } static void set_stack_yellow_zone_size(size_t s) { ! assert(is_size_aligned(s, os::vm_page_size()), "We can not protect if the yellow zone size is not page aligned."); assert(_stack_yellow_zone_size == 0, "This should be called only once."); _stack_yellow_zone_size = s; } static size_t stack_reserved_zone_size() { // _stack_reserved_zone_size may be 0. This indicates the feature is off. return _stack_reserved_zone_size; } static void set_stack_reserved_zone_size(size_t s) { ! assert(is_size_aligned(s, os::vm_page_size()), "We can not protect if the reserved zone size is not page aligned."); assert(_stack_reserved_zone_size == 0, "This should be called only once."); _stack_reserved_zone_size = s; } address stack_reserved_zone_base() { --- 1427,1448 ---- static size_t stack_yellow_zone_size() { assert(_stack_yellow_zone_size > 0, "Don't call this before the field is initialized."); return _stack_yellow_zone_size; } static void set_stack_yellow_zone_size(size_t s) { ! assert(is_aligned(s, os::vm_page_size()), "We can not protect if the yellow zone size is not page aligned."); assert(_stack_yellow_zone_size == 0, "This should be called only once."); _stack_yellow_zone_size = s; } static size_t stack_reserved_zone_size() { // _stack_reserved_zone_size may be 0. This indicates the feature is off. return _stack_reserved_zone_size; } static void set_stack_reserved_zone_size(size_t s) { ! assert(is_aligned(s, os::vm_page_size()), "We can not protect if the reserved zone size is not page aligned."); assert(_stack_reserved_zone_size == 0, "This should be called only once."); _stack_reserved_zone_size = s; } address stack_reserved_zone_base() {
*** 1478,1488 **** // loop touches all pages in the shadow zone. // This can be guaranteed differently, as well. E.g., if // the page size is a multiple of 4K, banging in 4K steps // suffices to touch all pages. (Some pages are banged // several times, though.) ! assert(is_size_aligned(s, os::vm_page_size()), "Stack bang assumes multiple of page size."); assert(_stack_shadow_zone_size == 0, "This should be called only once."); _stack_shadow_zone_size = s; } --- 1478,1488 ---- // loop touches all pages in the shadow zone. // This can be guaranteed differently, as well. E.g., if // the page size is a multiple of 4K, banging in 4K steps // suffices to touch all pages. (Some pages are banged // several times, though.) ! assert(is_aligned(s, os::vm_page_size()), "Stack bang assumes multiple of page size."); assert(_stack_shadow_zone_size == 0, "This should be called only once."); _stack_shadow_zone_size = s; }
< prev index next >