summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--generic/tclCkalloc.c4
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ea49edd..93bfdf8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2002-08-01 Mo DeJong <mdejong@users.sourceforge.net>
+
+ * generic/tclCkalloc.c (TclFinalizeMemorySubsystem):
+ Don't lock the ckalloc mutex before invoking the
+ Tcl_DumpActiveMemory function since it also
+ locks the same mutex. This code is only executed
+ when "memory onexit filename" has been executed
+ and Tcl is compiled with -DTCL_MEM_DEBUG.
+
2002-08-01 Reinhard Max <max@suse.de>
* win/tclWinPort.h: The windows headers don't provide socklen_t,
diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c
index 4a6c279..fe90a74 100644
--- a/generic/tclCkalloc.c
+++ b/generic/tclCkalloc.c
@@ -13,7 +13,7 @@
*
* This code contributed by Karl Lehenbauer and Mark Diekhans
*
- * RCS: @(#) $Id: tclCkalloc.c,v 1.16 2002/07/11 13:53:59 dkf Exp $
+ * RCS: @(#) $Id: tclCkalloc.c,v 1.17 2002/08/01 18:32:53 mdejong Exp $
*/
#include "tclInt.h"
@@ -1232,12 +1232,12 @@ void
TclFinalizeMemorySubsystem()
{
#ifdef TCL_MEM_DEBUG
- Tcl_MutexLock(ckallocMutexPtr);
if (tclMemDumpFileName != NULL) {
Tcl_DumpActiveMemory(tclMemDumpFileName);
} else if (onExitMemDumpFileName != NULL) {
Tcl_DumpActiveMemory(onExitMemDumpFileName);
}
+ Tcl_MutexLock(ckallocMutexPtr);
if (curTagPtr != NULL) {
TclpFree((char *) curTagPtr);
curTagPtr = NULL;