From: Robert Heller on
At Tue, 26 Jan 2010 08:10:28 -0800 (PST) pmarin <pacogeek(a)gmail.com> wrote:

>
> On Jan 26, 4:59=A0pm, Robert Heller <hel...(a)deepsoft.com> wrote:
> > At Tue, 26 Jan 2010 17:13:42 +0200 Georgios Petasis <peta...(a)iit.demokrit=
> os.gr> wrote:
> >
> >
> >
> > > And also keep in mind that Tcl never frees a Tcl object. Instead it is
> > > placed in a pool of "unused" objects, to be returned when a new tcl
> > > object is required. The details are in generic/tclObj.c (global variabl=
> e
> > > tclFreeObjList holds this list of unused objects).
> >
> > This is a common 'trick' used by many C programs to optimize memory
> > allocation. =A0Keeping separate 'free lists' of some commonly used/reused
> > data objects avoids searching through the heap for just the right sized
> > piece of memory. =A0Freeing is also quicker, since there is no need to
> > search the heap for adjacent memory blocks to join the freed object with.
> >
> >
> >
> > > George
> >
> > --
> > Robert Heller =A0 =A0 =A0 =A0 =A0 =A0 -- 978-544-6933
> > Deepwoods Software =A0 =A0 =A0 =A0-- Download the Model Railroad Systemht=
> tp://www.deepsoft.com/=A0-- Binaries for Linux and MS-Windows
> > hel...(a)deepsoft.com =A0 =A0 =A0 --http://www.deepsoft.com/ModelRailroadSy=
> stem/
>
> Is there any way to know how much memory is actually used or Just I
> only can count the object used?

If your Tcl system was compiled with TCL_MEM_DEBUG, you can use the
'memory' command:

man n memory

>

--
Robert Heller -- 978-544-6933
Deepwoods Software -- Download the Model Railroad System
http://www.deepsoft.com/ -- Binaries for Linux and MS-Windows
heller(a)deepsoft.com -- http://www.deepsoft.com/ModelRailroadSystem/

From: Donal K. Fellows on
On 26 Jan, 18:03, Robert Heller <hel...(a)deepsoft.com> wrote:
> If your Tcl system was compiled with TCL_MEM_DEBUG, you can use the
> 'memory' command:
>
> man n memory

That's typically set by configuring with --enable-symbols=mem

Donal.
First  |  Prev  | 
Pages: 1 2 3
Prev: kbs 0.4 binaries
Next: 16-bit greyscale photos in Tk