summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-01-13 11:17:17 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-01-13 11:17:17 (GMT)
commitdcb024402d1a3c73cf744af89c99f82339dc215c (patch)
tree72c201f217d5ffed28bcd7ae7866f687633204d0 /generic
parent7b39886f02248093aab85c82068ee768586cf19e (diff)
downloadtcl-dcb024402d1a3c73cf744af89c99f82339dc215c.zip
tcl-dcb024402d1a3c73cf744af89c99f82339dc215c.tar.gz
tcl-dcb024402d1a3c73cf744af89c99f82339dc215c.tar.bz2
Patch from Zoran Vasiljevic, fix for missing proper initialization of the threaded allocator in some situations.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclEvent.c3
-rw-r--r--generic/tclThreadAlloc.c1
2 files changed, 1 insertions, 3 deletions
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index 0eabc13..b0b8188 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -1043,9 +1043,6 @@ TclInitSubsystems(void)
#if USE_TCLALLOC
TclInitAlloc(); /* Process wide mutex init */
#endif
-#if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC)
- TclpInitAllocCache();
-#endif
#ifdef TCL_MEM_DEBUG
TclInitDbCkalloc(); /* Process wide mutex init */
#endif
diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c
index 2ee758e..fc281db 100644
--- a/generic/tclThreadAlloc.c
+++ b/generic/tclThreadAlloc.c
@@ -210,6 +210,7 @@ GetCache(void)
1 << (NBUCKETS - 2 - i) : 1;
bucketInfo[i].lockPtr = TclpNewAllocMutex();
}
+ TclpInitAllocCache();
}
Tcl_MutexUnlock(initLockPtr);
}