diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-04-16 12:58:47 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-04-16 12:58:47 (GMT) |
commit | e06feb86b1f483c70be8661a4914e980c91bef11 (patch) | |
tree | 22e9af25fb2a644bc7a4c5db7c7ab5c101ba8093 /doc | |
parent | 871fc208e1a4c758a0691b65054010c46696015f (diff) | |
download | tcl-e06feb86b1f483c70be8661a4914e980c91bef11.zip tcl-e06feb86b1f483c70be8661a4914e980c91bef11.tar.gz tcl-e06feb86b1f483c70be8661a4914e980c91bef11.tar.bz2 |
Document Tcl_GetMemoryInfo(). Backported from [063d44b0beea237e] (Thanks, Harald!)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/Alloc.3 | 13 |
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 |