From 316eec86b0874ec295c586102740591c39da32bf Mon Sep 17 00:00:00 2001 From: mdejong Date: Thu, 1 Aug 2002 18:32:53 +0000 Subject: * 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. --- ChangeLog | 9 +++++++++ generic/tclCkalloc.c | 4 ++-- 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 + + * 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 * 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; -- cgit v0.12