DumpActiveMemory.3
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:2k
- '"
- '" Copyright (c) 1992-1999 Karl Lehenbauer and Mark Diekhans.
- '" Copyright (c) 2000 by Scriptics Corporation.
- '" All rights reserved.
- '"
- '" RCS: @(#) $Id: DumpActiveMemory.3,v 1.5 2001/12/28 23:36:31 dgp 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_DumpActiveMemoryfR(fIfileNamefR)
- .sp
- void
- fBTcl_InitMemoryfR(fIinterpfR)
- .sp
- void
- fBTcl_ValidateAllMemoryfR(fIfileName, linefR)
- .SH ARGUMENTS
- .AP Tcl_Interp *interp in
- Tcl interpreter in which to add commands.
- .AP "CONST char" *fileName in
- For fBTcl_DumpActiveMemoryfR, name of the file to which memory
- information will be written. For fBTcl_ValidateAllMemoryfR, 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_ValidateAllMemoryfR is made
- (normally fB__LINE__fR).
- .BE
- .SH DESCRIPTION
- These functions provide access to Tcl memory debugging information.
- They are only functional when Tcl has been compiled with
- fBTCL_MEM_DEBUGfR defined at compile-time. When fBTCL_MEM_DEBUGfR
- is not defined, these functions are all no-ops.
- .PP
- fBTcl_DumpActiveMemoryfR 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 fBckallocfR was
- called to allocate the block and line number in that file. It is
- especially useful to call fBTcl_DumpActiveMemoryfR after the Tcl
- interpreter has been deleted.
- .PP
- fBTcl_InitMemoryfR adds the Tcl fBmemoryfR command to the
- interpreter given by fIinterpfR. fBTcl_InitMemoryfR is called
- by fBTcl_MainfR.
- .PP
- fBTcl_ValidateAllMemoryfR 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 fBckallocfR and
- fBckfreefR are called. This function forces the validation to occur
- at any point.
- .SH "SEE ALSO"
- TCL_MEM_DEBUG, memory
- .SH KEYWORDS
- memory, debug