Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b3c8630c7365225b0bc4893e773e2c786fbc7b6d
Ticket: 1abbfcdff166b9f6bd2de2c27e5d09315f7baaa0
Information request regarding 'memory' command
User & Date: sakthivp on 2014-03-07 07:35:47
Changes

  1. icomment:
    I compiled the Tcl libraries with TCL_MEM_DEBUG symbol by configuring using below command.
    
    ./configure --prefix=/scratch/sakthi/Tcl_8.4.9_debug --enable-symbols=all
    
    I found a library with name libtcl8.4g.so. Then i wrote a C program which uses the debug shared object to invoke Tcl 'memory' command. The program failed to execute the 'memory' command.
    C program
    ---------
    #include <stdio.h>
    #include <tcl.h>
    #include <stdio.h>
    #include <tcl.h>
    int main()
    {
     int x=0;
     Tcl_Interp* a;
     a =  Tcl_CreateInterp();
     Tcl_Init(a);
     Tcl_InitMemory(a);
     if (a == NULL)
     printf("Interpreter creation Failed \n");
     x = Tcl_Eval(a,(char *)"memory info");
     Tcl_DeleteInterp(a);
     printf("DeleteInterpreter x=%d \n",x);
    }
    ---------------------
    Compilation flags on solaris10 server
    
    /opt/Studio11/SUNWspro/bin/CC -L/scratch/sakthi/Tcl_8.4.9_debug/lib -ltcl8.4g -I/scratch/sakthi/Tcl_8.4.9_debug/include  Tcl_inter_problem.c -o Tcl_inter_problem
    ----------------------
    Output of the program
    
    DeleteInterpreter x=1  // Tcl_Eval function returns 1 (TCL_ERROR), unable to execute memory command.
    
    Am i doing anything wrong?
    
    I have attached the Makefile which was generated by configure script.
    
  2. login: "sakthivp"
  3. mimetype: "text/plain"