diff options
author | ericm <ericm@noemail.net> | 2000-09-14 18:42:26 (GMT) |
---|---|---|
committer | ericm <ericm@noemail.net> | 2000-09-14 18:42:26 (GMT) |
commit | 0f1b205649d2a26820b26f4b6745f929ef88304b (patch) | |
tree | de9d337513da3daa50909f5c0d11116e6ab9262e /doc/Alloc.3 | |
parent | dfce8968ef8a6a51b4b351ea94118e30317d7179 (diff) | |
download | tcl-0f1b205649d2a26820b26f4b6745f929ef88304b.zip tcl-0f1b205649d2a26820b26f4b6745f929ef88304b.tar.gz tcl-0f1b205649d2a26820b26f4b6745f929ef88304b.tar.bz2 |
* doc/Alloc.3: Added entries for Tcl_AttemptAlloc, Tcl_AttempRealloc.
* doc/StringObj.3: Added entry for Tcl_AttemptSetObjLength.
* generic/tclDecls.h:
* generic/tclStubInit.c: Regen'ed stubs files from new tcl.decls.
* generic/tcl.decls: Added stubs for the Tcl_Attempt* memory
allocators and for Tcl_AttemptSetObjLength.
* generic/tcl.h: Added #define's for attemptckalloc,
attemptckrealloc, which map to the Tcl_Attempt* memory allocators.
* generic/tclCkalloc.c: Added non-panic'ing versions of Tcl_Alloc,
Tcl_Realloc, etc.; these are called Tcl_AttemptAlloc,
Tcl_AttemptRealloc, etc. These are used by
Tcl_AttemptSetObjLength and the string obj append functions.
* generic/tclStringObj.c: Modified string growth algorithm to use
doubling algorithm as long as possible, and only fall back when
that fails. Added Tcl_AttemptSetObjLength, and modified
AppendUnicodeToUnicodeRep, AppendUtfToUtfRep, and
Tcl_AppendStringsToObjVA to support this.
FossilOrigin-Name: 66347b65e49a6866c410d4c89031857f714db201
Diffstat (limited to 'doc/Alloc.3')
-rw-r--r-- | doc/Alloc.3 | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/Alloc.3 b/doc/Alloc.3 index 405d7fa..c7396a0 100644 --- a/doc/Alloc.3 +++ b/doc/Alloc.3 @@ -4,7 +4,7 @@ '\" 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.2 1998/09/14 18:39:45 stanton Exp $ +'\" RCS: @(#) $Id: Alloc.3,v 1.3 2000/09/14 18:42:28 ericm Exp $ '\" .so man.macros .TH Tcl_Alloc 3 7.5 Tcl "Tcl Library Procedures" @@ -22,6 +22,12 @@ char * .sp char * \fBTcl_Realloc\fR(\fIptr, size\fR) +.sp +int +\fBTcl_AttemptAlloc\fR(\fIsize\fR) +.sp +int +\fBTcl_AttemptRealloc\fR(\fIptr, size\fR) .SH ARGUMENTS .AS char *size .AP int size in @@ -48,5 +54,11 @@ further allocation. \fIptr\fR to \fIsize\fR bytes and returns a pointer to the new block. The contents will be unchanged up to the lesser of the new and old sizes. The returned location may be different from \fIptr\fR. +.PP +\fBTcl_AttemptAlloc\fR and \fBTcl_AttemptRealloc\fR are identical in +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. .SH KEYWORDS alloc, allocation, free, malloc, memory, realloc |