summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-04-16 12:58:47 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-04-16 12:58:47 (GMT)
commite0ffb831fb5b4e9f3b3f395c979ec259acb52526 (patch)
tree22e9af25fb2a644bc7a4c5db7c7ab5c101ba8093 /doc
parented1d345faacd810c5e013df33c090a87749952d2 (diff)
downloadtcl-e0ffb831fb5b4e9f3b3f395c979ec259acb52526.zip
tcl-e0ffb831fb5b4e9f3b3f395c979ec259acb52526.tar.gz
tcl-e0ffb831fb5b4e9f3b3f395c979ec259acb52526.tar.bz2
Document Tcl_GetMemoryInfo(). Backported from [063d44b0beea237e] (Thanks, Harald!)
Diffstat (limited to 'doc')
-rw-r--r--doc/Alloc.313
1 files changed, 11 insertions, 2 deletions
diff --git a/doc/Alloc.3 b/doc/Alloc.3
index 585704a..70b0f7d 100644
--- a/doc/Alloc.3
+++ b/doc/Alloc.3
@@ -3,12 +3,12 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\"
+'\"
.TH Tcl_Alloc 3 7.5 Tcl "Tcl Library Procedures"
.so man.macros
.BS
.SH NAME
-Tcl_Alloc, Tcl_Free, Tcl_Realloc, Tcl_AttemptAlloc, Tcl_AttemptRealloc, ckalloc, ckfree, ckrealloc, attemptckalloc, attemptckrealloc \- allocate or free heap memory
+Tcl_Alloc, Tcl_Free, Tcl_Realloc, Tcl_AttemptAlloc, Tcl_AttemptRealloc, Tcl_GetMemoryInfo, ckalloc, ckfree, ckrealloc, attemptckalloc, attemptckrealloc \- allocate or free heap memory
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -28,6 +28,9 @@ char *
char *
\fBTcl_AttemptRealloc\fR(\fIptr, size\fR)
.sp
+void
+\fBTcl_GetMemoryInfo\fR(\fIdsPtr\fR)
+.sp
char *
\fBckalloc\fR(\fIsize\fR)
.sp
@@ -48,6 +51,8 @@ char *
Size in bytes of the memory block to allocate.
.AP char *ptr in
Pointer to memory block to free or realloc.
+.AP Tcl_DString *dsPtr in
+Initialized DString pointer.
.BE
.SH DESCRIPTION
@@ -88,5 +93,9 @@ these macros are redefined to be special debugging versions
of these procedures. To support Tcl's memory debugging within a
module, use the macros rather than direct calls to \fBTcl_Alloc\fR, etc.
+\fBTcl_GetMemoryInfo\fR appends a list-of-lists of memory stats to the
+provided DString. This function cannot be used in stub-enabled extensions,
+and it is only available if Tcl is compiled with the threaded memory allocator.
+
.SH KEYWORDS
alloc, allocation, free, malloc, memory, realloc, TCL_MEM_DEBUG