Artifacts Associated With Ticket 218027ffffffffff
Ticket change [b3ff88c660] (rid 124945) by nobody on 2000-10-26 00:52:20:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 1248 Bug Version: 8.0.3 SubmitDate: '1999-02-22' LastModified: '1999-08-14' Severity: SER Status: Closed Submitter: welch ChangedBy: hobbs OS: IRIX Machine: Other FixedDate: '2000-10-25' ClosedDate: '1999-08-14' Name: Forest Rouse Extensions: blt2.4, expect 5.25, scotty 2.1.8, Tix 8.0.1, tkX 8.0.3 CustomShell: Have not applied patches, no redefinitions, extended the core but the ReproducibleScript: None applicable -- Pretty much any tk script will see this problem ObservedBehavior: Didn't keep purify output Patch: *** tclObj.c~ Wed Apr 1 14:39:49 1998 --- tclObj.c Sun Feb 7 20:32:08 1999 *************** *** 27,32 **** --- 27,38 ---- */ Tcl_Obj *tclFreeObjList = NULL; + typedef struct Tcl_ObjectChunks_ { + char *chunk; + struct Tcl_ObjectChunks_ *next; + } Tcl_ObjectChunks; + + static Tcl_ObjectChunks *tclFreeObjAlloc = NULL; /* * Pointer to a heap-allocated string of length zero that the Tcl core uses *************** *** 189,195 **** --- 195,225 ---- static void FinalizeFreeObjList() { + /* First, run down all of the chunks. It cannot be a + Tcl_Obj (though I would have liked that) because + we are getting rid of the data storage for all objects + at this time. They could be objects, but would + have to be allocated in a mechanism seperate from + Tcl_NewObj */ + + Tcl_ObjectChunks *p = tclFreeObjAlloc; + while (p) { + char *chunk = p->chunk; + Tcl_ObjectChunks *next = p->next; + + /* Free chunk, get rid of chunk descriptor and go to next + descriptor. */ + + ckfree(chunk); + ckfree((char *) p); + p = next; + } + + /* Now note that both the free object list and the chunk + allocation lists are empty */ + tclFreeObjList = NULL; + tclFreeObjAlloc = NULL; } /* *************** *** 561,566 **** --- 591,597 ---- size_t bytesToAlloc = (OBJS_TO_ALLOC_EACH_TIME * objSizePlusPadding); char *basePtr; register Tcl_Obj *prevPtr, *objPtr; + register Tcl_ObjectChunks *chunkPtr; register int i; basePtr = (char *) ckalloc(bytesToAlloc); *************** *** 574,579 **** --- 605,617 ---- objPtr = (Tcl_Obj *) (((char *)objPtr) + objSizePlusPadding); } tclFreeObjList = prevPtr; + + /* Now store the actual chunk that was allocated */ + + chunkPtr = (Tcl_ObjectChunks *) ckalloc(sizeof(Tcl_ObjectChunks)); + chunkPtr->chunk = basePtr; + chunkPtr->next = tclFreeObjAlloc; + tclFreeObjAlloc = chunkPtr; } #undef OBJS_TO_ALLOC_EACH_TIME PatchFiles: tclObj.c This patch is no longer applicable to the code base (significant divergence). The mem leak may have been fixed along the way. -- 08/14/1999 hobbs - foundin initialized to: "obsolete: 8.0.3"
- 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: "Memory leak in core with Free object table"
- type initialized to: "Bug"
Ticket change [afcc8660d5] (rid 97877) by welch on 2000-10-26 08:13:42:
- closedate changed to: "2000-10-26T01:13:42"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [bed86cb292] (rid 102153) by dgp on 2001-04-16 22:59:31:
- closedate changed to: "2001-04-16T15:59:31"
- closer changed to: "dgp"
- subsystem changed to: "10. Objects"