summaryrefslogtreecommitdiffstats
path: root/doc/DumpActiveMemory.3
diff options
context:
space:
mode:
authorericm <ericm>2000-04-27 01:46:58 (GMT)
committerericm <ericm>2000-04-27 01:46:58 (GMT)
commit6061ec2039f13f53e1483b78e8e3e21c9b44df35 (patch)
tree8974ebecae490aa05cc0bdb7be7153f32954a587 /doc/DumpActiveMemory.3
parent0efff5ec3b5a0504d9f5c1f8a5f38bd6e98262e7 (diff)
downloadtcl-6061ec2039f13f53e1483b78e8e3e21c9b44df35.zip
tcl-6061ec2039f13f53e1483b78e8e3e21c9b44df35.tar.gz
tcl-6061ec2039f13f53e1483b78e8e3e21c9b44df35.tar.bz2
* doc/memory.n: Man page for Tcl "memory" command, which is
created when TCL_MEM_DEBUG is defined at compile time. * doc/TCL_MEM_DEBUG.3: Man page with overall information about TCL_MEM_DEBUG usage. * doc/DumpActiveMemory.3: Man page for Tcl_DumpActiveMemory, Tcl_InitMemory, and Tcl_ValidateAllMemory [Bug: 1816, 1835]. * generic/tclCkalloc.c: Fixed some function headers. * unix/mkLinks: Regen'd with new mkLinks.tcl. * unix/mkLinks.tcl: Fixed indentation, made link setup more intelligent (only do one existance test per man page, instead of one per function).
Diffstat (limited to 'doc/DumpActiveMemory.3')
-rw-r--r--doc/DumpActiveMemory.368
1 files changed, 68 insertions, 0 deletions
diff --git a/doc/DumpActiveMemory.3 b/doc/DumpActiveMemory.3
new file mode 100644
index 0000000..ab2a766
--- /dev/null
+++ b/doc/DumpActiveMemory.3
@@ -0,0 +1,68 @@
+'\"
+'\" Copyright (c) 1992-1999 Karl Lehenbauer and Mark Diekhans.
+'\" Copyright (c) 2000 by Scriptics Corporation.
+'\" All rights reserved.
+'\"
+'\" RCS: @(#) $Id: DumpActiveMemory.3,v 1.1 2000/04/27 01:46:59 ericm Exp $
+'\"
+.so man.macros
+.TH "Tcl_DumpActiveMemory" 3 8.1 Tcl "Tcl Library Procedures"
+.BS
+.SH NAME
+Tcl_DumpActiveMemory, Tcl_InitMemory, Tcl_ValidateAllMemory \- Validated memory allocation interface.
+.SH SYNOPSIS
+.nf
+\fB#include <tcl.h>\fR
+.sp
+int
+\fBTcl_DumpActiveMemory\fR(\fIfileName\fR)
+.sp
+void
+\fBTcl_InitMemory\fR(\fIinterp\fR)
+.sp
+void
+\fBTcl_ValidateAllMemory\fR(\fIfileName, line\fR)
+
+.SH ARGUMENTS
+.AP Tcl_Interp *interp in
+Tcl interpreter in which to add commands.
+.AP char *fileName in
+For \fBTcl_DumpActiveMemory\fR, name of the file to which memory
+information will be written. For \fBTcl_ValidateAllMemory\fR, name of
+the file from which the call is being made (normally \fB__FILE__\fR).
+.AP int line in
+Line number at which the call to \fBTcl_ValidateAllMemory\fR is made
+(normally \fB__LINE__\fR).
+.BE
+
+.SH DESCRIPTION
+These functions provide access to Tcl memory debugging information.
+They are only available when Tcl has been compiled with
+\fBTCL_MEM_DEBUG\fR defined at compile-time.
+.PP
+\fBTcl_DumpActiveMemory\fR will output a list of all currently
+allocated memory to the specified file. The information output for
+each allocated block of memory is: starting and ending addresses
+(excluding guard zone), size, source file where \fBckalloc\fR was
+called to allocate the block and line number in that file. It is
+especially useful to call \fBTcl_DumpActiveMemory\fR after the Tcl
+interpreter has been deleted.
+.PP
+\fBTcl_InitMemory\fR adds the Tcl \fBmemory\fR command to the
+interpreter given by \fIinterp\fR. It is called by \fBTcl_Main\fR
+when Tcl has been compiled with \fBTCL_MEM_DEBUG\fR defined.
+.PP
+\fBTcl_ValidateAllMemory\fR forces a validation of the guard zones of
+all currently allocated blocks of memory. Normally validation of a
+block occurs when its freed, unless full validation is enabled, in
+which case validation of all blocks occurs when \fBckalloc\fR and
+\fBckfree\fR are called. This function forces the validation to occur
+at any point.
+
+.SH SEE ALSO
+TCL_MEM_DEBUG, memory
+
+.SH KEYWORDS
+memory, debug
+
+