diff options
author | dgp <dgp@users.sourceforge.net> | 2007-10-26 20:11:50 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2007-10-26 20:11:50 (GMT) |
commit | 6b9dd216db20bac6c76552a6193d67a01e1d34ee (patch) | |
tree | b86166558de62f70eef1a7524fac75f7b47a4f44 /doc/memory.n | |
parent | 236c395276f8f1cf4d5b745ea490b4966e6eb148 (diff) | |
download | tcl-6b9dd216db20bac6c76552a6193d67a01e1d34ee.zip tcl-6b9dd216db20bac6c76552a6193d67a01e1d34ee.tar.gz tcl-6b9dd216db20bac6c76552a6193d67a01e1d34ee.tar.bz2 |
* changes: Updated for 8.5b2 release.core_8_5_b2
* doc/*.1: Revert doc changes that broke
* doc/*.3: `make html` so we can get the release
* doc/*.n: out the door.
Diffstat (limited to 'doc/memory.n')
-rw-r--r-- | doc/memory.n | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/doc/memory.n b/doc/memory.n index 0c2cd7b..05d107a 100644 --- a/doc/memory.n +++ b/doc/memory.n @@ -3,7 +3,7 @@ '\" Copyright (c) 2000 by Scriptics Corporation. '\" All rights reserved. '\" -'\" RCS: @(#) $Id: memory.n,v 1.7 2007/10/25 14:07:32 dkf Exp $ +'\" RCS: @(#) $Id: memory.n,v 1.8 2007/10/26 20:11:53 dgp Exp $ '\" .so man.macros .TH memory n 8.1 Tcl "Tcl Built-In Commands" @@ -13,6 +13,7 @@ memory \- Control Tcl memory debugging capabilities .SH SYNOPSIS \fBmemory \fIoption \fR?\fIarg arg ...\fR? .BE + .SH DESCRIPTION .PP The \fBmemory\fR command gives the Tcl developer control of Tcl's memory @@ -22,11 +23,9 @@ memory debugging enabled (when \fBTCL_MEM_DEBUG\fR is defined at compile time), and after \fBTcl_InitMemory\fR has been called. .TP \fBmemory active\fR \fIfile\fR -. Write a list of all currently allocated memory to the specified \fIfile\fR. .TP \fBmemory break_on_malloc\fR \fIcount\fR -. After the \fIcount\fR allocations have been performed, \fBckalloc\fR outputs a message to this effect and that it is now attempting to enter the C debugger. Tcl will then issue a \fISIGINT\fR signal against itself. @@ -34,26 +33,22 @@ If you are running Tcl under a C debugger, it should then enter the debugger command mode. .TP \fBmemory info\fR -. Returns a report containing the total allocations and frees since Tcl began, the current packets allocated (the current number of calls to \fBckalloc\fR not met by a corresponding call to \fBckfree\fR), the current bytes allocated, and the maximum number of packets and bytes allocated. .TP -\fBmemory init \fR[\fBon\fR|\fBoff\fR] -. +\fB memory init [on|off]\fR Turn on or off the pre-initialization of all allocated memory with bogus bytes. Useful for detecting the use of uninitialized values. .TP \fBmemory onexit\fR \fIfile\fR -. Causes a list of all allocated memory to be written to the specified \fIfile\fR during the finalization of Tcl's memory subsystem. Useful for checking that memory is properly cleaned up during process exit. .TP \fBmemory tag\fR \fIstring\fR -. Each packet of memory allocated by \fBckalloc\fR can have associated with it a string-valued tag. In the lists of allocated memory generated by \fBmemory active\fR and \fBmemory onexit\fR, the tag for each packet @@ -61,8 +56,8 @@ is printed along with other information about the packet. The \fBmemory tag\fR command sets the tag value for subsequent calls to \fBckalloc\fR to be \fIstring\fR. .TP -\fBmemory trace \fR[\fBon\fR|\fBoff\fR] -. +\fBmemory trace [on|off]\fR +.br Turns memory tracing on or off. When memory tracing is on, every call to \fBckalloc\fR causes a line of trace information to be written to \fIstderr\fR, consisting of the word \fIckalloc\fR, followed by the @@ -76,11 +71,8 @@ Calls to \fBckfree\fR are traced in the same manner. .RE .TP \fBmemory trace_on_at_malloc\fR \fIcount\fR -. -Enable memory tracing after \fIcount\fR \fBckalloc\fRs have been performed. -For example, if you enter -.QW "\fBmemory trace_on_at_malloc 100\fR" , -. +Enable memory tracing after \fIcount\fR \fBckalloc\fR's have been performed. +For example, if you enter \fBmemory trace_on_at_malloc 100\fR, after the 100th call to \fBckalloc\fR, memory trace information will begin being displayed for all allocations and frees. Since there can be a lot of memory activity before a problem occurs, judicious use of this option @@ -89,8 +81,7 @@ produced), if you can identify a number of allocations that occur before the problem sets in. The current number of memory allocations that have occurred since Tcl started is printed on a guard zone failure. .TP -\fBmemory validate \fR[\fBon\fR|\fBoff\fR] -. +\fBmemory validate [on|off]\fR Turns memory validation on or off. When memory validation is enabled, on every call to \fBckalloc\fR or \fBckfree\fR, the guard zones are checked for every piece of memory currently in existence that was @@ -101,8 +92,9 @@ overwrite can be detected on the first call to \fBckalloc\fR or \fBckfree\fR after the overwrite occurred, rather than when the specific memory with the overwritten guard zone(s) is freed, which may occur long after the overwrite occurred. + .SH "SEE ALSO" -ckalloc(3), ckfree(3), Tcl_ValidateAllMemory(3), Tcl_DumpActiveMemory(3), -TCL_MEM_DEBUG +ckalloc, ckfree, Tcl_ValidateAllMemory, Tcl_DumpActiveMemory, TCL_MEM_DEBUG + .SH KEYWORDS memory, debug |