1 /**************************************************************************/ 2 /* */ 3 /* OCaml */ 4 /* */ 5 /* Xavier Leroy, projet Cristal, INRIA Rocquencourt */ 6 /* */ 7 /* Copyright 1996 Institut National de Recherche en Informatique et */ 8 /* en Automatique. */ 9 /* */ 10 /* All rights reserved. This file is distributed under the terms of */ 11 /* the GNU Lesser General Public License version 2.1, with the */ 12 /* special exception on linking described in the file LICENSE. */ 13 /* */ 14 /**************************************************************************/ 15 16 /* structure of the stacks */ 17 18 #ifndef CAML_STACKS_H 19 #define CAML_STACKS_H 20 21 #ifdef CAML_INTERNALS 22 23 #include "misc.h" 24 #include "mlvalues.h" 25 #include "memory.h" 26 27 CAMLextern value * caml_stack_low; 28 CAMLextern value * caml_stack_high; 29 CAMLextern value * caml_stack_threshold; 30 CAMLextern value * caml_extern_sp; 31 CAMLextern value * caml_trapsp; 32 CAMLextern value * caml_trap_barrier; 33 34 #define Trap_pc(tp) (((code_t *)(tp))[0]) 35 #define Trap_link(tp) (((value **)(tp))[1]) 36 37 void caml_init_stack (uintnat init_max_size); 38 void caml_realloc_stack (asize_t required_size); 39 void caml_change_max_stack_size (uintnat new_max_size); 40 uintnat caml_stack_usage (void); 41 42 CAMLextern uintnat (*caml_stack_usage_hook)(void); 43 44 #endif /* CAML_INTERNALS */ 45 46 #endif /* CAML_STACKS_H */ 47