mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
6950178: Zero stack improvements
Moves the logic for determining the size of the Zero stack into the ZeroStack class. Reviewed-by: twisti
This commit is contained in:
parent
070ea7c310
commit
4d6c5d6fef
5 changed files with 24 additions and 10 deletions
|
@ -51,10 +51,7 @@ class StubGenerator: public StubCodeGenerator {
|
|||
// Set up the stack if necessary
|
||||
bool stack_needs_teardown = false;
|
||||
if (stack->needs_setup()) {
|
||||
size_t stack_used = thread->stack_base() - (address) &stack_used;
|
||||
size_t stack_free = thread->stack_size() - stack_used;
|
||||
size_t zero_stack_size = align_size_down(stack_free / 2, wordSize);
|
||||
|
||||
size_t zero_stack_size = stack->suggest_size(thread);
|
||||
stack->setup(alloca(zero_stack_size), zero_stack_size);
|
||||
stack_needs_teardown = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue