summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-04-16 13:14:55 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-04-16 13:14:55 (GMT)
commitbaa813085d114cb2e254365ad7e820c7b433467a (patch)
tree3056feecbf77a34d29c3ba5ef2257f7f6a2ced75 /doc
parent1c6fae0193fcf99ad83cd2562c8e01b6e1a49c5c (diff)
parente06feb86b1f483c70be8661a4914e980c91bef11 (diff)
downloadtcl-baa813085d114cb2e254365ad7e820c7b433467a.zip
tcl-baa813085d114cb2e254365ad7e820c7b433467a.tar.gz
tcl-baa813085d114cb2e254365ad7e820c7b433467a.tar.bz2
Document Tcl_GetMemoryInfo() and Tcl_MainEx()/Tcl_MainExW(). Backported from [063d44b0beea237e] (Thanks, Harald!)
Diffstat (limited to 'doc')
-rw-r--r--doc/Alloc.311
-rw-r--r--doc/Tcl_Main.312
2 files changed, 21 insertions, 2 deletions
diff --git a/doc/Alloc.3 b/doc/Alloc.3
index 8f25c52..70b0f7d 100644
--- a/doc/Alloc.3
+++ b/doc/Alloc.3
@@ -8,7 +8,7 @@
.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
diff --git a/doc/Tcl_Main.3 b/doc/Tcl_Main.3
index 2eae4b8..8104ece 100644
--- a/doc/Tcl_Main.3
+++ b/doc/Tcl_Main.3
@@ -10,13 +10,17 @@
.so man.macros
.BS
.SH NAME
-Tcl_Main, Tcl_SetStartupScript, Tcl_GetStartupScript, Tcl_SetMainLoop \- main program, startup script, and event loop definition for Tcl-based applications
+Tcl_Main, Tcl_MainEx, Tcl_MainExW, Tcl_SetStartupScript, Tcl_GetStartupScript, Tcl_SetMainLoop \- main program, startup script, and event loop definition for Tcl-based applications
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
\fBTcl_Main\fR(\fIargc, argv, appInitProc\fR)
.sp
+\fBTcl_MainEx\fR(\fIargc, charargv, appInitProc, interp\fR)
+.sp
+\fBTcl_MainExW\fR(\fIargc, wideargv, appInitProc, interp\fR)
+.sp
\fBTcl_SetStartupScript\fR(\fIpath, encoding\fR)
.sp
Tcl_Obj *
@@ -30,6 +34,10 @@ Number of elements in \fIargv\fR.
.AP char *argv[] in
Array of strings containing command-line arguments. On Windows, when
using -DUNICODE, the parameter type changes to wchar_t *.
+.AP char *charargv[] in
+As argv, but does not change type to wchar_t.
+.AP char *wideargv[] in
+As argv, but type is always wchar_t.
.AP Tcl_AppInitProc *appInitProc in
Address of an application-specific initialization procedure.
The value for this argument is usually \fBTcl_AppInit\fR.
@@ -42,6 +50,8 @@ If non-NULL, location to write a copy of the (const char *)
pointing to the encoding name.
.AP Tcl_MainLoopProc *mainLoopProc in
Address of an application-specific event loop procedure.
+.AP Tcl_Interp *interp in
+Already created Tcl Interpreter.
.BE
.SH DESCRIPTION
.PP