hotspot/src/cpu/zero/vm/stack_zero.inline.hpp
changeset 35201 996db89f378e
parent 27669 c2c526bc1a18
child 35479 62c12ca7a45e
equal deleted inserted replaced
35192:76f4de26388d 35201:996db89f378e
    47 // This method returns the amount of ABI stack available for us
    47 // This method returns the amount of ABI stack available for us
    48 // to use under normal circumstances.  Note that the returned
    48 // to use under normal circumstances.  Note that the returned
    49 // value can be negative.
    49 // value can be negative.
    50 inline int ZeroStack::abi_stack_available(Thread *thread) const {
    50 inline int ZeroStack::abi_stack_available(Thread *thread) const {
    51   guarantee(Thread::current() == thread, "should run in the same thread");
    51   guarantee(Thread::current() == thread, "should run in the same thread");
    52   int stack_used = thread->stack_base() - (address) &stack_used
    52   assert(thread->stack_size() -
    53     + (StackYellowPages+StackRedPages+StackShadowPages) * os::vm_page_size();
    53          (thread->stack_base() - (address) &stack_used +
    54   int stack_free = thread->stack_size() - stack_used;
    54           JavaThread::stack_guard_zone_size() + JavaThread::stack_shadow_zone_size()) ==
    55   return stack_free;
    55          (address)&stack_used - thread->stack_overflow_limit(), "sanity");
       
    56   return (address)&stack_used - stack_overflow_limit();
    56 }
    57 }
    57 
    58 
    58 #endif // CPU_ZERO_VM_STACK_ZERO_INLINE_HPP
    59 #endif // CPU_ZERO_VM_STACK_ZERO_INLINE_HPP