summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredman <redman>1999-06-26 00:01:47 (GMT)
committerredman <redman>1999-06-26 00:01:47 (GMT)
commita902e4fe9a13656280a34ae9f2e15c778c874351 (patch)
tree7fdbab3c15cc91885be670e4f0415085508bcfef
parent898d7759a0e9880ed62d1f0585863f8c9a034c8d (diff)
downloadtcl-a902e4fe9a13656280a34ae9f2e15c778c874351.zip
tcl-a902e4fe9a13656280a34ae9f2e15c778c874351.tar.gz
tcl-a902e4fe9a13656280a34ae9f2e15c778c874351.tar.bz2
Changed so unix always maps ckalloc to Tcl_Alloc or Tcl_DbCkAlloc to avoid
problems with mixed TCL_MEM_DEBUG modes.
-rw-r--r--generic/tcl.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index 187811c..0f72d8d 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tcl.h,v 1.48 1999/06/25 23:47:16 welch Exp $
+ * RCS: @(#) $Id: tcl.h,v 1.49 1999/06/26 00:01:47 redman Exp $
*/
#ifndef _TCL
@@ -1129,22 +1129,15 @@ typedef int (Tcl_DriverGetHandleProc) _ANSI_ARGS_((
#else /* !TCL_MEM_DEBUG */
/*
- * If USE_TCLALLOC is true, then we need to call Tcl_Alloc instead of
- * the native malloc/free. The only time USE_TCLALLOC should not be
- * true is when compiling the Tcl/Tk libraries on Unix systems. In this
- * case we can safely call the native malloc/free directly as a performance
- * optimization.
+ * If we are not using the debugging allocator, we should call the
+ * Tcl_Alloc, et al. routines in order to guarantee that every module
+ * is using the same memory allocator both inside and outside of the
+ * Tcl library.
*/
-# if USE_TCLALLOC
-# define ckalloc(x) Tcl_Alloc(x)
-# define ckfree(x) Tcl_Free(x)
-# define ckrealloc(x,y) Tcl_Realloc(x,y)
-# else
-# define ckalloc(x) malloc(x)
-# define ckfree(x) free(x)
-# define ckrealloc(x,y) realloc(x,y)
-# endif
+# define ckalloc(x) Tcl_Alloc(x)
+# define ckfree(x) Tcl_Free(x)
+# define ckrealloc(x,y) Tcl_Realloc(x,y)
# define Tcl_InitMemory(x)
# define Tcl_DumpActiveMemory(x)
# define Tcl_ValidateAllMemory(x,y)