summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-05-12 15:00:02 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-05-12 15:00:02 (GMT)
commita720a9f6e21c4c9afd7a4b125478dc9800db11c2 (patch)
tree6fe041ed2c20bacf83cb1461e04f999517ed8740 /generic/tclInt.h
parent3495bd2531b93a17421d6dc087527ef5fa111118 (diff)
downloadtcl-a720a9f6e21c4c9afd7a4b125478dc9800db11c2.zip
tcl-a720a9f6e21c4c9afd7a4b125478dc9800db11c2.tar.gz
tcl-a720a9f6e21c4c9afd7a4b125478dc9800db11c2.tar.bz2
Set the defaults of all growth algorithm parameters based on one master value.
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 8f003be..d010284 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -4097,8 +4097,22 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file,
*----------------------------------------------------------------
*/
+/* General tuning for minimum growth in Tcl growth algorithms */
+#ifndef TCL_MIN_GROWTH
+# ifdef TCL_GROWTH_MIN_ALLOC
+ /* Support for any legacy tuners */
+# define TCL_MIN_GROWTH TCL_GROWTH_MIN_ALLOC
+# else
+# define TCL_MIN_GROWTH 1024
+# endif
+#endif
+
+/* Token growth tuning, default to the general value. */
+#ifndef TCL_MIN_TOKEN_GROWTH
+#define TCL_MIN_TOKEN_GROWTH TCL_MIN_GROWTH/sizeof(Tcl_Token)
+#endif
+
#define TCL_MAX_TOKENS (int)(UINT_MAX / sizeof(Tcl_Token))
-#define TCL_MIN_TOKEN_GROWTH 50
#define TclGrowTokenArray(tokenPtr, used, available, append, staticPtr) \
do { \
int needed = (used) + (append); \