src/cpu/zero/vm/stack_zero.hpp

Print this page
@  rev 7209 : Zero+PPC64: Stack overflow when running Maven
|


  82   }
  83 
  84   void push(intptr_t value) {
  85     assert(_sp > _base, "stack overflow");
  86     *(--_sp) = value;
  87   }
  88   intptr_t pop() {
  89     assert(_sp < _top, "stack underflow");
  90     return *(_sp++);
  91   }
  92 
  93   void *alloc(size_t size) {
  94     int count = align_size_up(size, wordSize) >> LogBytesPerWord;
  95     assert(count <= available_words(), "stack overflow");
  96     return _sp -= count;
  97   }
  98 
  99   int shadow_pages_size() const {
 100     return _shadow_pages_size;
 101   }
 102   int abi_stack_available(Thread *thread) const;
 103 
 104  public:
 105   void overflow_check(int required_words, TRAPS);
 106   static void handle_overflow(TRAPS);
 107 
 108  public:
 109   void zap(int c) PRODUCT_RETURN;
 110 
 111  public:
 112   static ByteSize base_offset() {
 113     return byte_offset_of(ZeroStack, _base);
 114   }
 115   static ByteSize top_offset() {
 116     return byte_offset_of(ZeroStack, _top);
 117   }
 118   static ByteSize sp_offset() {
 119     return byte_offset_of(ZeroStack, _sp);
 120   }
 121 };
 122 




  82   }
  83 
  84   void push(intptr_t value) {
  85     assert(_sp > _base, "stack overflow");
  86     *(--_sp) = value;
  87   }
  88   intptr_t pop() {
  89     assert(_sp < _top, "stack underflow");
  90     return *(_sp++);
  91   }
  92 
  93   void *alloc(size_t size) {
  94     int count = align_size_up(size, wordSize) >> LogBytesPerWord;
  95     assert(count <= available_words(), "stack overflow");
  96     return _sp -= count;
  97   }
  98 
  99   int shadow_pages_size() const {
 100     return _shadow_pages_size;
 101   }
 102   ssize_t abi_stack_available(Thread *thread) const;
 103 
 104  public:
 105   void overflow_check(int required_words, TRAPS);
 106   static void handle_overflow(TRAPS);
 107 
 108  public:
 109   void zap(int c) PRODUCT_RETURN;
 110 
 111  public:
 112   static ByteSize base_offset() {
 113     return byte_offset_of(ZeroStack, _base);
 114   }
 115   static ByteSize top_offset() {
 116     return byte_offset_of(ZeroStack, _top);
 117   }
 118   static ByteSize sp_offset() {
 119     return byte_offset_of(ZeroStack, _sp);
 120   }
 121 };
 122