diff options
author | msofer <msofer@noemail.net> | 2008-07-29 18:19:08 (GMT) |
---|---|---|
committer | msofer <msofer@noemail.net> | 2008-07-29 18:19:08 (GMT) |
commit | 5c734a81e8262eeef20c439074b4157c940f5bb5 (patch) | |
tree | 5b6f051382e2f35069953bec645baefdad1b9e97 /generic/tclThreadAlloc.c | |
parent | d6286463ff0b8c8bd98401e289313d2ee96b211f (diff) | |
download | tcl-5c734a81e8262eeef20c439074b4157c940f5bb5.zip tcl-5c734a81e8262eeef20c439074b4157c940f5bb5.tar.gz tcl-5c734a81e8262eeef20c439074b4157c940f5bb5.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.
FossilOrigin-Name: 1a3aa54ccf74aa3861453ae9462d94c7f120f2e0
Diffstat (limited to 'generic/tclThreadAlloc.c')
-rwxr-xr-x | generic/tclThreadAlloc.c | 18 |
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 + * *---------------------------------------------------------------------- */ |