hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
changeset 46619 a3919f5e8d2b
parent 42905 1af223983f82
child 46625 edefffab74e2
equal deleted inserted replaced
46618:d503911aa948 46619:a3919f5e8d2b
   348   size_t guard_bytes;
   348   size_t guard_bytes;
   349   res = pthread_attr_getguardsize(&attr, &guard_bytes);
   349   res = pthread_attr_getguardsize(&attr, &guard_bytes);
   350   if (res != 0) {
   350   if (res != 0) {
   351     fatal("pthread_attr_getguardsize failed with errno = %d", res);
   351     fatal("pthread_attr_getguardsize failed with errno = %d", res);
   352   }
   352   }
   353   int guard_pages = align_size_up(guard_bytes, page_bytes) / page_bytes;
   353   int guard_pages = align_up(guard_bytes, page_bytes) / page_bytes;
   354   assert(guard_bytes == guard_pages * page_bytes, "unaligned guard");
   354   assert(guard_bytes == guard_pages * page_bytes, "unaligned guard");
   355 
   355 
   356 #ifdef IA64
   356 #ifdef IA64
   357   // IA64 has two stacks sharing the same area of memory, a normal
   357   // IA64 has two stacks sharing the same area of memory, a normal
   358   // stack growing downwards and a register stack growing upwards.
   358   // stack growing downwards and a register stack growing upwards.
   359   // Guard pages, if present, are in the centre.  This code splits
   359   // Guard pages, if present, are in the centre.  This code splits
   360   // the stack in two even without guard pages, though in theory
   360   // the stack in two even without guard pages, though in theory
   361   // there's nothing to stop us allocating more to the normal stack
   361   // there's nothing to stop us allocating more to the normal stack
   362   // or more to the register stack if one or the other were found
   362   // or more to the register stack if one or the other were found
   363   // to grow faster.
   363   // to grow faster.
   364   int total_pages = align_size_down(stack_bytes, page_bytes) / page_bytes;
   364   int total_pages = align_down(stack_bytes, page_bytes) / page_bytes;
   365   stack_bottom += (total_pages - guard_pages) / 2 * page_bytes;
   365   stack_bottom += (total_pages - guard_pages) / 2 * page_bytes;
   366 #endif // IA64
   366 #endif // IA64
   367 
   367 
   368   stack_bottom += guard_bytes;
   368   stack_bottom += guard_bytes;
   369 
   369