From: Alexandre F. <ale...@gm...> - 2010-02-01 21:21:43
|
On 2/1/10, Donald G Porter <don...@ni...> wrote: > Alexandre Ferrieux wrote: > > > (3) What about obj->typePtr itself ? > > > > The reform you are talking about does not apply to objPtr->typePtr. > That field must either hold a valid pointer to the Tcl_ObjType struct > that governs the current intrep, or NULL to indicate there is no current > intrep. No other state is valid. Of course: the point is precisely to get an unambiguously invalid state, so that a SIGBUS is obtained as soon as use is attempted from a stale reference. > Unless you talking exclusively about those Tcl_Obj structs that have > been returned to the free list. For those I don't think I care. This scheme applies to any kind of allocation, be it direct ckalloc, or block allocation like Tcl_Obj. So the objects in the free list are one case among many. And I believe all these discarded objects would uniformly benefit from a reliable "reuse detector" costing very little at free time, and nothing at valid use time. -Alex |