Am 15.10.2026 um 20:30 schrieb Alan Grunwald:
> Following my recent query about reference counting (thanks again for the responses), I feel that I should have access to the 'memory' command, which I see means that I need to define TCL_MEM_DEBUG at compile time. That immediately raises two questions: > > i) Exactly how do I do that? > >     I expect that I need to specify something when I run configure. >     Maybe something like > >           configure --define=TCL_MEM_DEBUG --prefix=<wherever> > >     but I can't find what exactly. > > ii) Will I need to recompile all the binary extensions I use? > >     If not, I plan to build and install Tcl with the symbol defined, >     rename tclsh9.1 to tclsh-mem9.1 with a tclsh-mem softlink pointing >     to it, then re-install a "standard" Tcl in the same directory with a >     tclsh softlink. This would let me do tclsh to run a "standard" shell >     and tclsh-mem to run a shell that supports 'memory'. > >     If I would need to recompile the binary extensions, then I guess I >     need two parallel directories. I suppose I can get away with putting >     the tclsh-mem softlink in the "standard" directory and only have a >     single entry in PATH. > > > Many thanks > > > Alan
Yes, aparently, it is an official feature: https://www.tcl-lang.org/man/tcl9.1/TclLib/TCL_MEM_DEBUG.html On MS-Win, the head of the make file has comment how to use it (opts=MEM_DEBUG). But the file unix\README contains the information: How I understand it: --enable-symbols=mem But the instructions are unclear to me. Room for improvement on the man page and help files... Sorry, Harald