< prev index next >

src/cpu/zero/vm/stack_zero.hpp

Print this page




   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #ifndef CPU_ZERO_VM_STACK_ZERO_HPP
  27 #define CPU_ZERO_VM_STACK_ZERO_HPP
  28 

  29 #include "utilities/sizes.hpp"
  30 
  31 class ZeroStack {
  32  private:
  33   intptr_t *_base; // the last available word
  34   intptr_t *_top;  // the word past the end of the stack
  35   intptr_t *_sp;   // the top word on the stack
  36 
  37  private:
  38   int _shadow_pages_size; // how much ABI stack must we keep free?
  39 
  40  public:
  41   ZeroStack();
  42 
  43   bool needs_setup() const {
  44     return _base == NULL;
  45   }
  46 
  47   int suggest_size(Thread *thread) const;
  48 




   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #ifndef CPU_ZERO_VM_STACK_ZERO_HPP
  27 #define CPU_ZERO_VM_STACK_ZERO_HPP
  28 
  29 #include "utilities/align.hpp"
  30 #include "utilities/sizes.hpp"
  31 
  32 class ZeroStack {
  33  private:
  34   intptr_t *_base; // the last available word
  35   intptr_t *_top;  // the word past the end of the stack
  36   intptr_t *_sp;   // the top word on the stack
  37 
  38  private:
  39   int _shadow_pages_size; // how much ABI stack must we keep free?
  40 
  41  public:
  42   ZeroStack();
  43 
  44   bool needs_setup() const {
  45     return _base == NULL;
  46   }
  47 
  48   int suggest_size(Thread *thread) const;
  49 


< prev index next >