summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2011-05-12 15:00:02 (GMT)
committerdgp <dgp@noemail.net>2011-05-12 15:00:02 (GMT)
commit49f033153bafda3372c838648b25c2dd7974233b (patch)
tree6fe041ed2c20bacf83cb1461e04f999517ed8740 /generic/tclInt.h
parent7e2f93303496d40ec1ee9d826e5dbfbba3ed5c15 (diff)
downloadtcl-49f033153bafda3372c838648b25c2dd7974233b.zip
tcl-49f033153bafda3372c838648b25c2dd7974233b.tar.gz
tcl-49f033153bafda3372c838648b25c2dd7974233b.tar.bz2
Set the defaults of all growth algorithm parameters based on one master value.
FossilOrigin-Name: e0b726da8e7c9b32be1ab8a4ca1b09bd5a163989
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); \