Overview
| Artifact ID: | 28d363c1dee3ad35aad5c8f83b441e13966859e5 |
|---|---|
| Ticket: | 219371ffffffffffffffffffffffffffffffffff
Incongruent def'n of Tcl_Alloc when compiled with TCL_MEM_DE |
| User & Date: | nobody on 2000-10-26 05:11:46 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 5987 Bug Version: 8.4a1 SubmitDate: '2000-07-06' LastModified: '2000-10-25' Severity: MED Status: UnAssn Submitter: techsupp OS: All FixedDate: '2000-10-25' ClosedDate: '2000-10-25' Name: Paul Duffin CVS: 26-Jun-2000 ObservedBehavior: In about version 8.1 when compiled with -DTCL_MEM_DEBUG Tcl_Alloc used to be a macro which called Tcl_DbCkalloc passing the file and line number at which it was called. This changed sometime after version 8.1. There is no point in having two sets of memory allocation routines, one of which does aid with debugging and one of which does not. DesiredBehavior: Tcl_Alloc should behave like ckalloc, in fact ckalloc should be deprecated in favour of Tcl_Alloc. Patch: Index: scriptics/tcl/generic/tcl.h diff -c scriptics/tcl/generic/tcl.h:1.1.1.1 scriptics/tcl/generic/tcl.h:1.1.1.1.4.1 *** scriptics/tcl/generic/tcl.h:1.1.1.1Tue Jul 4 17:59:22 2000 --- scriptics/tcl/generic/tcl.hTue Jul 4 18:41:28 2000 *************** *** 1196,1210 **** #else /* !TCL_MEM_DEBUG */ /* ! * 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. */ ! # 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) --- 1196,1224 ---- #else /* !TCL_MEM_DEBUG */ /* ! * There is no point in having two seperate sets of routines, ckalloc ! * and Tcl_Alloc only one of which turns on debugging information when ! * the TCL_MEM_DEBUG compile flag is defined. The following macros simply ! * map ckalloc to Tcl_Alloc This reverts to Tcl 8.1 behaviour. */ + + #define ckalloc(x) Tcl_Alloc(x) + #define ckfree(x) Tcl_Free(x) + #define ckrealloc(x,y) Tcl_Realloc(x,y) + + #ifdef TCL_MEM_DEBUG ! /* ! * Define the Tcl_Alloc macros to supply extra debugging information ! * to the debug memory allocator. ! */ ! ! # define Tcl_Alloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__) ! # define Tcl_Free(x) Tcl_DbCkfree(x, __FILE__, __LINE__) ! # define Tcl_Realloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__) ! ! #else /* !TCL_MEM_DEBUG */ ! # define Tcl_InitMemory(x) # define Tcl_DumpActiveMemory(x) # define Tcl_ValidateAllMemory(x,y) PatchFiles: generic/tcl.h
- foundin changed to: "obsolete: 8.4a1"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "69. Other"
- title changed to:
Change in behaviour of Tcl_Alloc when compiled with -DTCL_ME
- type changed to: "Bug"