aboutsummaryrefslogtreecommitdiffstats
path: root/execute.h
diff options
context:
space:
mode:
authorbjj <bjj>1997-03-05 08:41:47 +0000
committerbjj <bjj>1997-03-05 08:41:47 +0000
commite6d92fbbd39ec6b819f4712417b6f05684e068db (patch)
treed25f4bb842ad3707e5af061fc6e9caf7c71621f8 /execute.h
parent322d9846b3a375a91ab709cacdac546c7011f868 (diff)
downloadmoo-cvs-e6d92fbbd39ec6b819f4712417b6f05684e068db.tar.gz
moo-cvs-e6d92fbbd39ec6b819f4712417b6f05684e068db.tar.xz
moo-cvs-e6d92fbbd39ec6b819f4712417b6f05684e068db.zip
A few malloc-friendly changes: rt_stacks are now centrally allocated/freed
so that we can keep a pool of them handy. rt_envs are similarly pooled. Both revert to malloc/free for large requests.
Diffstat (limited to 'execute.h')
-rw-r--r--execute.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/execute.h b/execute.h
index c9f51a7..82b0db7 100644
--- a/execute.h
+++ b/execute.h
@@ -29,9 +29,11 @@ typedef struct {
Program *prog;
Var *rt_env; /* same length as prog.var_names */
Var *base_rt_stack;
- Var *top_rt_stack; /* the stack has a fixed size equal to prog.num_var_names;
- top_rt_stack always points to next empty slot;
+ Var *top_rt_stack; /* the stack has a fixed size equal to
+ vector.max_stack. top_rt_stack
+ always points to next empty slot;
there is no need to check bounds! */
+ int rt_stack_size; /* size of stack allocated */
unsigned pc;
unsigned error_pc;
Byte bi_func_pc; /* next == 0 means a normal activation, which just
@@ -128,9 +130,14 @@ extern int read_activ(activation * a, int which_vector);
#endif
/* $Log$
-/* Revision 1.2 1997/03/03 04:18:40 nop
-/* GNU Indent normalization
+/* Revision 1.3 1997/03/05 08:41:49 bjj
+/* A few malloc-friendly changes: rt_stacks are now centrally allocated/freed
+/* so that we can keep a pool of them handy. rt_envs are similarly pooled.
+/* Both revert to malloc/free for large requests.
/*
+ * Revision 1.2 1997/03/03 04:18:40 nop
+ * GNU Indent normalization
+ *
* Revision 1.1.1.1 1997/03/03 03:45:03 nop
* LambdaMOO 1.8.0p5
*