Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8c0b69e14f126092e5540cc6e673b680581700e1
Ticket: 2960042fffffffffffffffffffffffffffffffff
high water mark memory not shared for file I/O needs
User & Date: ferrieux on 2010-03-04 15:53:33
Changes

  1. icomment:
    
    Update: Donal nearly convinced me that the "statistics" (rare/frequent case) regarding free-able blocks are in favour of trying a block-deallocation scheme. "Nearly", because the problem is to do it efficiently. Several issues:
    
    (1) since (as you're right to point out) the block-freeing should not wait for alloc failures (mainly because alien code like extensions could not benefit from reclaimable space), it should happen routinely and hence be reasonably fast. This implies keeping track of which block is freeable instead of doing a sweeping pass just in time. Keeping track implies, for each individual Tcl_Obj allocation/deallocation, knowing to which block the object belongs, which is not currently recorded, and would require extra space in the object (or a sweeping pass with address comparisons, which we've just rejected).
    
    (2) if we go towards object relocation as you suggest, things get even worse. Indeed, since objects are reached by single indirection (not double, like old MacOS's relocatable "handles"), moving any of them implies finding references to it; short of adding a complicated back-reference system, this in turns means a mark-and-sweep pass. And even if we wild magic gives us the back references lying in container objects or vars, we still have to worry about the refs which are in the current C stack (eg in [foreach]), not to move the rug under our feet.
    
    Tough.
    
      
    
    
    
  2. login: "ferrieux"
  3. mimetype: "text/plain"
  4. username: "ferrieux"