Article View: comp.lang.tcl
Article #63Re: support for 'memory' command
From: Alan Grunwald
Date: Fri, 16 Oct 2026 16:39
Date: Fri, 16 Oct 2026 16:39
61 lines
3442 bytes
3442 bytes
On 16/10/2026 08:47, Harald Oehlmann wrote: > 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 Thanks Harald, I'll give it a go. The README file is fairly good actually; like everything it could be improved but it's actually quite serviceable. (My problem was simply that as I was expecting a "--with" flag, I didn't look properly at the "--enable" flags.) Alan
Technical Details
Message-ID:
<11atjv8$3f4jj$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11ar64t$2kpp9$1@dont-email.me> <11askpu$33ig7$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Alan Grunwald <nospam.nurdglaw@gmail.com> Newsgroups: comp.lang.tcl Subject: Re: support for 'memory' command Date: Fri, 16 Oct 2026 17:39:04 +0100 Organization: A noiseless patient Spider Lines: 61 Message-ID: <11atjv8$3f4jj$1@dont-email.me> References: <11ar64t$2kpp9$1@dont-email.me> <11askpu$33ig7$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 16 Oct 2026 16:39:08 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3641971"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18wp8WLHVzWyVCbR7c2++Xhm2gXVmyU/MA="; posting-host="15479b1f8bfa5c3dc0269f274d972b20" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:YPW53iQoWb0MbwQCgq66sMYqcZc= sha256:BtDZSF6FadQJ2vAN9YG/P/i8XoPfOeFuw0US0omFpWE= sha1:hEVUJac1Ju24Of52I72SgP1E+iA= sha256:gCEnjppsUOqKS8L6J/6cTnpw19BmJ+EH7rDnU4+M8dE= Content-Language: en-US In-Reply-To: <11askpu$33ig7$1@dont-email.me>