summaryrefslogtreecommitdiffstats
path: root/doc/Alloc.3
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-02-26 02:22:20 (GMT)
committerhobbs <hobbs>2002-02-26 02:22:20 (GMT)
commita250b602bbacce9038f853923b404d201515d375 (patch)
tree158a5169c133ef118e679f04aba398690ac940e5 /doc/Alloc.3
parentf8727f56d1dfd46f35afb51029e6395ca1481153 (diff)
downloadtcl-a250b602bbacce9038f853923b404d201515d375.zip
tcl-a250b602bbacce9038f853923b404d201515d375.tar.gz
tcl-a250b602bbacce9038f853923b404d201515d375.tar.bz2
* doc/Alloc.3:
* doc/LinkVar.3: * doc/ObjectType.3: * doc/PkgRequire.3: * doc/Preserve.3: * doc/TCL_MEM_DEBUG.3: Updated documentation to describe the ckalloc, ckfree, ckrealloc, attemptckalloc, and attemptckrealloc macros, and to accurately describe when and how they are used. [Bug #497459] (dgp)
Diffstat (limited to 'doc/Alloc.3')
-rw-r--r--doc/Alloc.332
1 files changed, 29 insertions, 3 deletions
diff --git a/doc/Alloc.3 b/doc/Alloc.3
index ff7abf8..a671564 100644
--- a/doc/Alloc.3
+++ b/doc/Alloc.3
@@ -4,13 +4,13 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Alloc.3,v 1.5 2001/04/06 23:14:08 andreas_kupries Exp $
+'\" RCS: @(#) $Id: Alloc.3,v 1.6 2002/02/26 02:22:20 hobbs Exp $
'\"
.so man.macros
.TH Tcl_Alloc 3 7.5 Tcl "Tcl Library Procedures"
.BS
.SH NAME
-Tcl_Alloc, Tcl_Free, Tcl_Realloc, Tcl_AttemptAlloc, Tcl_AttemptRealloc \- allocate or free heap memory
+Tcl_Alloc, Tcl_Free, Tcl_Realloc, Tcl_AttemptAlloc, Tcl_AttemptRealloc, ckalloc, ckfree, ckrealloc, attemptckalloc, attemptckrealloc \- allocate or free heap memory
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -18,6 +18,7 @@ Tcl_Alloc, Tcl_Free, Tcl_Realloc, Tcl_AttemptAlloc, Tcl_AttemptRealloc \- alloca
char *
\fBTcl_Alloc\fR(\fIsize\fR)
.sp
+void
\fBTcl_Free\fR(\fIptr\fR)
.sp
char *
@@ -28,6 +29,21 @@ char *
.sp
char *
\fBTcl_AttemptRealloc\fR(\fIptr, size\fR)
+.sp
+char *
+\fBckalloc\fR(\fIsize\fR)
+.sp
+void
+\fBckfree\fR(\fIptr\fR)
+.sp
+char *
+\fBckrealloc\fR(\fIptr, size\fR)
+.sp
+char *
+\fBattemptckalloc\fR(\fIsize\fR)
+.sp
+char *
+\fBattemptckrealloc\fR(\fIptr, size\fR)
.SH ARGUMENTS
.AS char *size
.AP int size in
@@ -60,5 +76,15 @@ function to \fBTcl_Alloc\fR and \fBTcl_Realloc\fR, except that
\fBTcl_AttemptAlloc\fR and \fBTcl_AttemptRealloc\fR will not cause the Tcl
interpreter to \fBpanic\fR if the memory allocation fails. If the
allocation fails, these functions will return NULL.
+.PP
+The procedures \fBckalloc\fR, \fBckfree\fR, \fBckrealloc\fR,
+\fBattemptckalloc\fR, and \fBattemptckrealloc\fR are implemented
+as macros. Normally, they are synonyms for the correponding
+procedures documented on this page. When Tcl and all modules
+calling Tcl are compiled with \fBTCL_MEM_DEBUG\fR defined, however,
+these macros are redefined to be special debugging versions of
+of these procedures. To support Tcl's memory debugging within a
+module, use the macros rather than direct calls to \fBTcl_Alloc\fR, etc.
+
.SH KEYWORDS
-alloc, allocation, free, malloc, memory, realloc
+alloc, allocation, free, malloc, memory, realloc, TCL_MEM_DEBUG