diff src/cpu/zero/vm/stubGenerator_zero.cpp @ 1511:348346af6676

6950178: Zero stack improvements Summary: Moves the logic for determining the size of the Zero stack into the ZeroStack class. Reviewed-by: twisti Contributed-by: Gary Benson <gbenson@redhat.com>
author twisti
date Thu, 06 May 2010 02:09:18 -0700
parents f9271ff9d324
children c18cbe5936b8
line wrap: on
line diff
--- a/src/cpu/zero/vm/stubGenerator_zero.cpp	Wed May 05 05:57:21 2010 -0700
+++ b/src/cpu/zero/vm/stubGenerator_zero.cpp	Thu May 06 02:09:18 2010 -0700
@@ -51,10 +51,7 @@
     // 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;
     }