summaryrefslogtreecommitdiffstats
path: root/generic/tclThreadAlloc.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2008-07-29 18:19:08 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2008-07-29 18:19:08 (GMT)
commite0dc5ad1dac50c004c16b1b5945aeda964c40ecd (patch)
tree5b6f051382e2f35069953bec645baefdad1b9e97 /generic/tclThreadAlloc.c
parentd63487fc10c65ca57db9496dc4300e63faece5fa (diff)
downloadtcl-e0dc5ad1dac50c004c16b1b5945aeda964c40ecd.zip
tcl-e0dc5ad1dac50c004c16b1b5945aeda964c40ecd.tar.gz
tcl-e0dc5ad1dac50c004c16b1b5945aeda964c40ecd.tar.bz2
* generic/tclBasic.c: Made use of the thread's alloc cache
* generic/tclInt.h: stored in the ekeko at interp creation * generic/tclNRE.h: to avoid hitting the TSD each time an * generic/tclThreadAlloc.c: NRE callback is pushed or pulled; the approach is suitably general to extend to evry other obj allocation where an interp is know; this is left for some other time, requires a lot of grunt work.
Diffstat (limited to 'generic/tclThreadAlloc.c')
-rwxr-xr-xgeneric/tclThreadAlloc.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c
index 0850d66..a448328 100755
--- a/generic/tclThreadAlloc.c
+++ b/generic/tclThreadAlloc.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclThreadAlloc.c,v 1.27 2008/03/20 09:49:16 dkf Exp $
+ * RCS: @(#) $Id: tclThreadAlloc.c,v 1.28 2008/07/29 18:19:17 msofer Exp $
*/
#include "tclInt.h"
@@ -37,7 +37,9 @@
*/
#define NOBJALLOC 800
-#define NOBJHIGH 1200
+
+/* Actual definition moved to tclInt.h */
+#define NOBJHIGH ALLOC_NOBJHIGH
/*
* The following union stores accounting information for each block including
@@ -97,7 +99,9 @@ typedef struct Bucket {
/*
* The following structure defines a cache of buckets and objs, of which there
- * will be (at most) one per thread.
+ * will be (at most) one per thread. Any changes need to be reflected in the
+ * struct AllocCache defined in tclInt.h, possibly also in the initialisation
+ * code in Tcl_CreateInterp().
*/
typedef struct Cache {
@@ -490,6 +494,10 @@ TclpRealloc(
* May move Tcl_Obj's from shared cached or allocate new Tcl_Obj's if
* list is empty.
*
+ * Note:
+ * If this code is updated, the changes need to be reflected in the
+ * macro TclAllocObjStorageEx() defined in tclInt.h
+ *
*----------------------------------------------------------------------
*/
@@ -559,6 +567,10 @@ TclThreadAllocObj(void)
* Side effects:
* May move free Tcl_Obj's to shared list upon hitting high water mark.
*
+ * Note:
+ * If this code is updated, the changes need to be reflected in the
+ * macro TclAllocObjStorageEx() defined in tclInt.h
+ *
*----------------------------------------------------------------------
*/