< prev index next >
src/cpu/zero/vm/stack_zero.inline.hpp
Print this page
*** 47,59 ****
// This method returns the amount of ABI stack available for us
// to use under normal circumstances. Note that the returned
// value can be negative.
inline int ZeroStack::abi_stack_available(Thread *thread) const {
guarantee(Thread::current() == thread, "should run in the same thread");
! assert(thread->stack_size() -
! (thread->stack_base() - (address) &stack_used +
! JavaThread::stack_guard_zone_size() + JavaThread::stack_shadow_zone_size()) ==
! (address)&stack_used - thread->stack_overflow_limit(), "sanity");
! return (address)&stack_used - stack_overflow_limit();
}
#endif // CPU_ZERO_VM_STACK_ZERO_INLINE_HPP
--- 47,58 ----
// This method returns the amount of ABI stack available for us
// to use under normal circumstances. Note that the returned
// value can be negative.
inline int ZeroStack::abi_stack_available(Thread *thread) const {
guarantee(Thread::current() == thread, "should run in the same thread");
! int stack_used = thread->stack_base() - (address) &stack_used
! + (JavaThread::stack_guard_zone_size() + JavaThread::stack_shadow_zone_size());
! int stack_free = thread->stack_size() - stack_used;
! return stack_free;
}
#endif // CPU_ZERO_VM_STACK_ZERO_INLINE_HPP
< prev index next >