summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2009-05-08 01:02:26 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2009-05-08 01:02:26 (GMT)
commit7592bff0075283d77566536c9bea32df7073e73d (patch)
tree3cdc92382395a57ab68cc6fdb3b197d39dc8000d /generic/tclBasic.c
parent33fd9238dc467ef70e757a917e4c8ddd2dd7d78e (diff)
downloadtcl-7592bff0075283d77566536c9bea32df7073e73d.zip
tcl-7592bff0075283d77566536c9bea32df7073e73d.tar.gz
tcl-7592bff0075283d77566536c9bea32df7073e73d.tar.bz2
* generic/tclBasic.c: Let coroutines start with a much smaller
* generic/tclCompile.h: stack: 200 words (previously was 2000, * generic/tclExecute.c: the same as interps)
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index d5aad5d..41e3824 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.392 2009/04/30 23:25:32 msofer Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.393 2009/05/08 01:02:26 msofer Exp $
*/
#include "tclInt.h"
@@ -31,6 +31,11 @@
#include <assert.h>
#endif
+
+#define INTERP_STACK_INITIAL_SIZE 2000
+#define CORO_STACK_INITIAL_SIZE 200
+
+
/*
* Determine whether we're using IEEE floating point
*/
@@ -608,7 +613,7 @@ Tcl_CreateInterp(void)
* variable).
*/
- iPtr->execEnvPtr = TclCreateExecEnv(interp);
+ iPtr->execEnvPtr = TclCreateExecEnv(interp, INTERP_STACK_INITIAL_SIZE);
/*
* TIP #219, Tcl Channel Reflection API support.
@@ -8479,7 +8484,7 @@ TclNRCoroutineObjCmd(
}
corPtr = (CoroutineData *) ckalloc(sizeof(CoroutineData));
- corPtr->eePtr = TclCreateExecEnv(interp);
+ corPtr->eePtr = TclCreateExecEnv(interp, CORO_STACK_INITIAL_SIZE);
corPtr->callerEEPtr = iPtr->execEnvPtr;
corPtr->eePtr->corPtr = corPtr;
corPtr->stackLevel = NULL;