Artifacts Associated With Ticket 219371ffffffffff
Ticket change [28d363c1de] (rid 88769) by nobody on 2000-10-26 05:11:46:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized 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 initialized to: "obsolete: 8.4a1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to:
Change in behaviour of Tcl_Alloc when compiled with -DTCL_ME
- type initialized to: "Bug"
Ticket change [3e18b4aa81] (rid 121205) by dkf on 2000-11-15 16:37:41:
- icomment:
I have to admit that I never fully understood which memory allocator routines to use, and ended up using the Tcl_* ones throughout. It is important, however, that the Tcl_* allocator routines continue to exist in the stubs table, so that people can guarantee that their extension uses the same allocator as Tcl (apparently an issue under Windows.)
- login: "dkf"
- mimetype: "text/plain"
- priority changed to: "3 Low"
- subsystem changed to: "15. Dict Object"
- username: "dkf"
- icomment:
Ticket change [7b7f4f5fa2] (rid 96917) by dkf on 2001-02-08 21:31:39:
- subsystem changed to: "41. Memory Allocation"
Ticket change [279f694d37] (rid 88550) by dkf on 2001-09-20 17:41:46:
- assignee changed to: "hobbs"
Ticket change [3d7768a954] (rid 121095) by hobbs on 2001-10-15 01:40:15:
- icomment:
Logged In: YES user_id=72656 That behavior is still in 8.3.3/8.4a3. In fact, it looks like it can really be a problem if somehow Tcl is compiled without TCL_MEM_DEBUG but an extension is (because Tcl_DbCkalloc won't be defined).
- login: "hobbs"
- mimetype: "text/plain"
- priority changed to: "5 Medium"
- title changed to:
Incongruent def'n of Tcl_Alloc when compiled with TCL_MEM_DE
- username: "hobbs"
- icomment:
Ticket change [97456aae3d] (rid 106477) by dgp on 2003-11-18 05:27:31:
- icomment:
Logged In: YES user_id=80530 It seems these issues may be at the heart of what extensions can and cannot be successfully [load]ed into an interp. If someone has the dependencies sorted out, we need them to be introspectable at the script level for protecting against [load]s that cannot succeed.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [49e5ceecd5] (rid 126448) by dgp on 2006-03-10 23:33:39:
- icomment:
Logged In: YES user_id=80530 status?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [d3fe2d64c6] (rid 123370) by hobbs on 2007-06-13 02:46:33:
- closedate changed to: "2007-06-12T19:46:33"
- closer changed to: "hobbs"
- resolution changed to: "Out of Date"
- status changed to: "Closed"