1Tcl_DumpActiveMemory(3)     Tcl Library Procedures     Tcl_DumpActiveMemory(3)
2
3
4
5______________________________________________________________________________
6

NAME

8       Tcl_DumpActiveMemory, Tcl_InitMemory, Tcl_ValidateAllMemory - Validated
9       memory allocation interface.
10

SYNOPSIS

12       #include <tcl.h>
13
14       int
15       Tcl_DumpActiveMemory(fileName)
16
17       void
18       Tcl_InitMemory(interp)
19
20       void
21       Tcl_ValidateAllMemory(fileName, line)
22
23

ARGUMENTS

25       Tcl_Interp   *interp            (in)      Tcl interpreter in  which  to
26                                                 add commands.
27
28       CONST char   *fileName          (in)      For     Tcl_DumpActiveMemory,
29                                                 name of  the  file  to  which
30                                                 memory  information  will  be
31                                                 written.     For    Tcl_Vali‐
32                                                 dateAllMemory,  name  of  the
33                                                 file from which the  call  is
34                                                 being      made     (normally
35                                                 __FILE__).
36
37       int          line               (in)      Line number at which the call
38                                                 to  Tcl_ValidateAllMemory  is
39                                                 made (normally __LINE__).
40_________________________________________________________________
41
42

DESCRIPTION

44       These functions provide access to  Tcl  memory  debugging  information.
45       They  are only functional when Tcl has been compiled with TCL_MEM_DEBUG
46       defined at compile-time.  When  TCL_MEM_DEBUG  is  not  defined,  these
47       functions are all no-ops.
48
49       Tcl_DumpActiveMemory will output a list of all currently allocated mem‐
50       ory to the specified file.  The information output for  each  allocated
51       block  of  memory  is:   starting and ending addresses (excluding guard
52       zone), size, source file where ckalloc was called to allocate the block
53       and  line  number  in  that  file.   It  is  especially  useful to call
54       Tcl_DumpActiveMemory after the Tcl interpreter has been deleted.
55
56       Tcl_InitMemory adds the Tcl memory command to the interpreter given  by
57       interp.  Tcl_InitMemory is called by Tcl_Main.
58
59       Tcl_ValidateAllMemory  forces  a  validation  of the guard zones of all
60       currently allocated blocks of memory.  Normally validation of  a  block
61       occurs when its freed, unless full validation is enabled, in which case
62       validation of all blocks occurs when ckalloc  and  ckfree  are  called.
63       This function forces the validation to occur at any point.
64
65

SEE ALSO

67       TCL_MEM_DEBUG, memory
68
69

KEYWORDS

71       memory, debug
72
73
74
75
76
77Tcl                                   8.1              Tcl_DumpActiveMemory(3)
Impressum