summaryrefslogtreecommitdiffstats
path: root/generic/tclEvent.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclEvent.c')
-rw-r--r--generic/tclEvent.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index 0b585b6..5f8fbee 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -1043,11 +1043,9 @@ TclInitSubsystems(void)
* implementation of self-initializing locks.
*/
+ TclInitAlloc(); /* Process wide allocator init */
TclInitThreadStorage(); /* Creates master hash table for
* thread local storage */
-#if USE_TCLALLOC
- TclInitAlloc(); /* Process wide mutex init */
-#endif
#ifdef TCL_MEM_DEBUG
TclInitDbCkalloc(); /* Process wide mutex init */
#endif
@@ -1221,14 +1219,6 @@ Tcl_Finalize(void)
TclFinalizeSynchronization();
/*
- * Close down the thread-specific object allocator.
- */
-
-#if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC)
- TclFinalizeThreadAlloc();
-#endif
-
- /*
* We defer unloading of packages until very late to avoid memory access
* issues. Both exit callbacks and synchronization variables may be stored
* in packages.
@@ -1252,6 +1242,14 @@ Tcl_Finalize(void)
TclFinalizeMemorySubsystem();
+ /*
+ * Close down the thread-specific object allocator.
+ */
+
+ TclFinalizeAlloc();
+
+
+
alreadyFinalized:
TclFinalizeLock();
}