mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8178489: Make align functions more type safe and consistent
Reviewed-by: mgerdin, rehn
This commit is contained in:
parent
229f386a8f
commit
0fcf645cff
49 changed files with 134 additions and 140 deletions
|
@ -235,7 +235,7 @@ size_t os::current_stack_size() {
|
|||
}
|
||||
// base may not be page aligned
|
||||
address base = current_stack_base();
|
||||
address bottom = (address)align_size_up((intptr_t)(base - size), os::vm_page_size());;
|
||||
address bottom = align_ptr_up(base - size, os::vm_page_size());;
|
||||
return (size_t)(base - bottom);
|
||||
}
|
||||
|
||||
|
@ -1122,7 +1122,7 @@ void os::initialize_thread(Thread* thr) {
|
|||
if (current_size == 0) current_size = 2 * K * K;
|
||||
stack_size = current_size > (8 * K * K) ? (8 * K * K) : current_size;
|
||||
}
|
||||
address bottom = (address)align_size_up((intptr_t)(base - stack_size), os::vm_page_size());;
|
||||
address bottom = align_ptr_up(base - stack_size, os::vm_page_size());;
|
||||
stack_size = (size_t)(base - bottom);
|
||||
|
||||
assert(stack_size > 0, "Stack size calculation problem");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue