diff options
Diffstat (limited to 'doc/memory.n')
-rw-r--r-- | doc/memory.n | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/doc/memory.n b/doc/memory.n index 7e49882..5a1524b 100644 --- a/doc/memory.n +++ b/doc/memory.n @@ -3,10 +3,8 @@ '\" Copyright (c) 2000 by Scriptics Corporation. '\" All rights reserved. '\" -'\" RCS: @(#) $Id: memory.n,v 1.12 2008/01/18 15:51:08 dkf Exp $ -'\" -.so man.macros .TH memory n 8.1 Tcl "Tcl Built-In Commands" +.so man.macros .BS .SH NAME memory \- Control Tcl memory debugging capabilities @@ -41,10 +39,17 @@ 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 -\fB memory init \fR[\fBon\fR|\fBoff\fR] +\fBmemory init \fR[\fBon\fR|\fBoff\fR] . Turn on or off the pre-initialization of all allocated memory -with bogus bytes. Useful for detecting the use of uninitialized values. +with bogus bytes. Useful for detecting the use of uninitialized +values. +.TP +\fBmemory objs \fIfile\fR +. +Causes a list of all allocated Tcl_Obj values to be written to the specified +\fIfile\fR immediately, together with where they were allocated. Useful for +checking for leaks of values. .TP \fBmemory onexit\fR \fIfile\fR . @@ -69,9 +74,11 @@ to \fBckalloc\fR causes a line of trace information to be written to address returned, the amount of memory allocated, and the C filename and line number of the code performing the allocation. For example: .RS +.PP .CS ckalloc 40e478 98 tclProc.c 1406 .CE +.PP Calls to \fBckfree\fR are traced in the same manner. .RE .TP @@ -103,3 +110,6 @@ occur long after the overwrite occurred. ckalloc, ckfree, Tcl_ValidateAllMemory, Tcl_DumpActiveMemory, TCL_MEM_DEBUG .SH KEYWORDS memory, debug +'\"Local Variables: +'\"mode: nroff +'\"End: |