1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-29 08:20:20 +02:00

* eval.c, eval.h, coop.c (scm_eval_stack, SCM_EVAL_STACK): Measure

stack size in machine words.
This commit is contained in:
Mikael Djurfeldt 1998-04-12 23:34:43 +00:00
parent 09725fff9d
commit a74145b809
3 changed files with 9 additions and 4 deletions

View file

@ -40,7 +40,7 @@
* If you do not wish that, delete this exception notice. */
/* $Id: coop.c,v 1.7 1998-03-30 21:02:31 mdj Exp $ */
/* $Id: coop.c,v 1.8 1998-04-12 23:34:40 mdj Exp $ */
/* Cooperative thread library, based on QuickThreads */
@ -48,7 +48,7 @@
#include "eval.h"
/* #define COOP_STKSIZE (0x10000) */
#define COOP_STKSIZE (SCM_EVAL_STACK)
#define COOP_STKSIZE (scm_eval_stack)
/* `alignment' must be a power of 2. */
#define COOP_STKALIGN(sp, alignment) \

View file

@ -1422,8 +1422,10 @@ int scm_debug_eframe_size;
int scm_debug_mode, scm_check_entry_p, scm_check_apply_p, scm_check_exit_p;
int scm_eval_stack;
scm_option scm_eval_opts[] = {
{ SCM_OPTION_INTEGER, "stack", 0x10000, "Size of thread stacks." }
{ SCM_OPTION_INTEGER, "stack", 22000, "Size of thread stacks (in machine words)." }
};
scm_option scm_debug_opts[] = {
@ -1443,7 +1445,7 @@ scm_option scm_debug_opts[] = {
{ SCM_OPTION_INTEGER, "depth", 20, "Maximal length of printed backtrace." },
{ SCM_OPTION_BOOLEAN, "backtrace", 0, "Show backtrace on error." },
{ SCM_OPTION_BOOLEAN, "debug", 0, "Use the debugging evaluator." },
{ SCM_OPTION_INTEGER, "stack", 20000, "Stack size limit (0 = no check)." }
{ SCM_OPTION_INTEGER, "stack", 20000, "Stack size limit (measured in words; 0 = no check)." }
};
scm_option scm_evaluator_trap_table[] = {
@ -1464,6 +1466,7 @@ scm_eval_options_interface (setting)
scm_eval_opts,
SCM_N_EVAL_OPTIONS,
s_eval_options_interface);
scm_eval_stack = SCM_EVAL_STACK * sizeof (void *);
SCM_ALLOW_INTS;
return ans;
}

View file

@ -56,6 +56,8 @@ extern scm_option scm_eval_opts[];
#define SCM_EVAL_STACK scm_eval_opts[0].val
#define SCM_N_EVAL_OPTIONS 1
extern scm_eval_stack;
extern scm_option scm_evaluator_trap_table[];
#define SCM_ENTER_FRAME_P scm_evaluator_trap_table[0].val