Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 32cd08cd8828268990df6457b8d315749b3aa43d
Ticket: 2345638fffffffffffffffffffffffffffffffff
Tcl_GetMemoryInfo aborts w/threaded memory allocator
User & Date: sdeasey on 2008-11-25 19:58:24
Changes

  1. assignee changed to: "andreas_kupries"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    With Tcl from HEAD compiled:
    
      --enable-threads --enable-symbols=mem
    
    on a modern 32bit Linux, a program (naviserver) linked with that Tcl aborts with this message:
    
      Tcl_GetMemoryInfo called when threaded memory allocator not in use
    
    Yet the tclConfig.sh contains:
    
      -DTCL_THREADS=1
      -DUSE_THREAD_ALLOC=1
    
    And the symbol USE_THREAD_ALLOC, which this feature depends on, seems to be unconditionally defined when --enable-threads is specified.
    
    Is the threaded allocator actually enabled when --enable-threads is specified (this used to be the case), or is Tcl_GetMemoryInfo mistaken?
    
    What is the correct way to figure out whether I can call Tcl_GetMemoryInfo from an application?
    
    
    Also, it would be nice to have a configure switch for the memory allocator:
    
      --enable-thread-allocator
    
    You could default it to on if --enable-threads is specified, as used to be the case, but you may want to default this to off considering that OS allocators perform better with threads than they used to and for the typical threaded desktop app are likely to use much less memory than the Tcl allocator.
    
    
  4. foundin changed to: "obsolete: 8.6a4"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "sdeasey"
  10. subsystem changed to: "49. Threading"
  11. title changed to:
    Tcl_GetMemoryInfo aborts w/threaded memory allocator
    
  12. type changed to: "Bug"