Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 42f59adb1e7cc50a2f6855b9683fc08df3cd4bc6
Ticket: 3381371fffffffffffffffffffffffffffffffff
possible memory leak?
User & Date: vasiljevic on 2011-08-02 14:44:28
Changes

  1. icomment:
    I think the problem is in the Tcl finalization area. 
    The interp itself is clean. The finalization isn't :-( 
    Some years ago I contemplated to rewrite the 
    finalization code using refcounts but this was a 
    major undertaking and I never found time for it. 
    The 8.4 seems to be more stable in this respect
    which is why we still stick to it.  
    
    In the meantime, creating a set of worker threads
    upfront (or using tpool with fixed number of workers)
    should keep the memory in the "reasonable" area.
    Also, turning off the greedy threading allocator that
    never releases memory to the system and using the
    regular system malloc instead could also be a good 
    move. I recall we turned that off some years ago and
    I cannot recall our app becomming slower (yet it 
    became a fifth of its original memory footprint!).
    
    I think this could be a hard nut to crack. In some days
    I will get more spare time to checkout the latest head
    and see what all happened there since the last time 
    I looked at it. 
    
    
    
    
  2. login: "vasiljevic"
  3. mimetype: "text/plain"
  4. username: "vasiljevic"