Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2002-02-26
09:23 • Closed ticket [497459ffff]: document ckalloc/ckfree plus 7 other changes artifact: 071c15385c user: hobbs
2002-01-05
00:47 • Add attachment alloc.patch to ticket [497459ffff] artifact: 80466ef3f0 user: dgp
00:47 • Ticket [497459ffff] document ckalloc/ckfree status still Open with 4 other c... artifact: 3ff83e039e user: dgp
00:47 • Ticket [497459ffff]: 5 changes artifact: b76c26c313 user: dgp
2002-01-04
22:27 • Ticket [497459ffff]: 4 changes artifact: e5a1d9ea11 user: dgp
22:21 • Ticket [497459ffff]: 4 changes artifact: 208ba8b603 user: dgp
2001-12-29
07:14 • Ticket [497459ffff]: 4 changes artifact: 4b633fc511 user: dgp
2001-12-28
23:48 • New ticket [497459ffff]. artifact: f573613479 user: dgp

document ckalloc/ckfree

Closed / Fixed497459ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 25 years ago
Descriptionplain2001-12-28 23:48:56
There are a few places in Tcl's documentation where
the routines ckalloc() and ckfree() are mentioned.
However, these synonyms for Tcl_Alloc() and
Tcl_Free() are not themselves documented anywhere.

I propose to document them in the Tcl_Alloc man
page as deprecated synonyms [*], then to update all
references from ckalloc -> Tcl_Alloc and
ckfree -> Tcl_Free.

Patch coming soon.

[*] following the example of panic() and Tcl_Panic().
dgpplain2001-12-29 07:14:22
Logged In: YES 
user_id=80530

Deprecation might not be the right idea after all.
Using ckalloc() instead of Tcl_Alloc() appears to be the
only way to get __FILE__ and __LINE__ data into the
memory reports produced when TCL_MEM_DEBUG is enabled.

All the more reason to get them documented I guess...
dgpplain2002-01-04 22:21:02
Logged In: YES 
user_id=80530

Note that ckalloc() and ckfree() are not in 
Tcl's public stub table.

It appears one must choose between supporting stubs
and supporting memory debugging in their extension.
Is that right?  Is that as it should be?
dgpplain2002-01-04 22:27:14
Logged In: YES 
user_id=80530

Never mind on that last point.  ckalloc(), ckfree(), etc.
are always macros -- whether or not things are stub-enabled.
ckalloc() resolves to Tcl_Alloc or Tcl_DbCkalloc and both
of those are in the stub table.
dgpplain2002-01-05 00:47:06
Logged In: YES 
user_id=80530

Here's a patch that updates to documentation to
cover ckalloc, ckfree, etc.
dgpplain2002-01-05 00:47:07
File Added - 15482: alloc.patch
hobbsplain2002-02-26 09:23:56
Logged In: YES 
user_id=72656

I patched all but the following files, as I felt the other 
changes were really not necessary for the average user (and 
potentially confusing).  Just knowing about Tcl_Alloc is 
good for 99.5% of users.

+* doc/Concat.3:
+* doc/CrtMathFnc.3:
+* doc/Hash.3:
+* doc/Interp.3:
+* doc/SetResult.3:
+* doc/SplitList.3:
+* doc/SplitPath.3:
Log in (anonymous is fine) to add a comment.

Attachments: