Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/tcl8.5.2/doc/DumpActiveMemory.3 @ 25

Last change on this file since 25 was 25, checked in by landauf, 16 years ago

added tcl to libs

File size: 2.3 KB
Line 
1'\"
2'\" Copyright (c) 1992-1999 Karl Lehenbauer and Mark Diekhans.
3'\" Copyright (c) 2000 by Scriptics Corporation.
4'\" All rights reserved.
5'\"
6'\" RCS: @(#) $Id: DumpActiveMemory.3,v 1.8 2004/10/07 15:15:36 dkf Exp $
7'\"
8.so man.macros
9.TH "Tcl_DumpActiveMemory" 3 8.1 Tcl "Tcl Library Procedures"
10.BS
11.SH NAME
12Tcl_DumpActiveMemory, Tcl_InitMemory, Tcl_ValidateAllMemory \- Validated memory allocation interface
13.SH SYNOPSIS
14.nf
15\fB#include <tcl.h>\fR
16.sp
17int
18\fBTcl_DumpActiveMemory\fR(\fIfileName\fR)
19.sp
20void
21\fBTcl_InitMemory\fR(\fIinterp\fR)
22.sp
23void
24\fBTcl_ValidateAllMemory\fR(\fIfileName, line\fR)
25
26.SH ARGUMENTS
27.AS Tcl_Interp *fileName
28.AP Tcl_Interp *interp in
29Tcl interpreter in which to add commands.
30.AP "const char" *fileName in
31For \fBTcl_DumpActiveMemory\fR, name of the file to which memory
32information will be written.  For \fBTcl_ValidateAllMemory\fR, name of
33the file from which the call is being made (normally \fB__FILE__\fR).
34.AP int line in
35Line number at which the call to \fBTcl_ValidateAllMemory\fR is made
36(normally \fB__LINE__\fR).
37.BE
38
39.SH DESCRIPTION
40These functions provide access to Tcl memory debugging information.
41They are only functional when Tcl has been compiled with
42\fBTCL_MEM_DEBUG\fR defined at compile-time.  When \fBTCL_MEM_DEBUG\fR
43is not defined, these functions are all no-ops.
44.PP
45\fBTcl_DumpActiveMemory\fR will output a list of all currently
46allocated memory to the specified file.  The information output for
47each allocated block of memory is:  starting and ending addresses
48(excluding guard zone), size, source file where \fBckalloc\fR was
49called to allocate the block and line number in that file.  It is
50especially useful to call \fBTcl_DumpActiveMemory\fR after the Tcl
51interpreter has been deleted.
52.PP
53\fBTcl_InitMemory\fR adds the Tcl \fBmemory\fR command to the
54interpreter given by \fIinterp\fR.  \fBTcl_InitMemory\fR is called
55by \fBTcl_Main\fR.
56.PP
57\fBTcl_ValidateAllMemory\fR forces a validation of the guard zones of
58all currently allocated blocks of memory.  Normally validation of a
59block occurs when its freed, unless full validation is enabled, in
60which case validation of all blocks occurs when \fBckalloc\fR and
61\fBckfree\fR are called.  This function forces the validation to occur
62at any point.
63
64.SH "SEE ALSO"
65TCL_MEM_DEBUG, memory
66
67.SH KEYWORDS
68memory, debug
69
70
Note: See TracBrowser for help on using the repository browser.