summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authormig <mig@noemail.net>2011-03-18 16:16:09 (GMT)
committermig <mig@noemail.net>2011-03-18 16:16:09 (GMT)
commitd10a8940a2a3b7689051095416d8070dcf4a8069 (patch)
tree3b4b825395c09a31cf53e8e545e667b8b194c28e /generic/tclInt.h
parent64c8a5e4d654b5078e5621571090edf48d94fb9b (diff)
downloadtcl-d10a8940a2a3b7689051095416d8070dcf4a8069.zip
tcl-d10a8940a2a3b7689051095416d8070dcf4a8069.tar.gz
tcl-d10a8940a2a3b7689051095416d8070dcf4a8069.tar.bz2
New function TclAllocMaximize(). Let tclListObj.c find out the real allocated size, thus reducing the number of reallocs. It's good to avoid the interplay between List and Alloc both doubling just-in-case.
FossilOrigin-Name: b8f22672b20ef57964ed0cf47ce82ad38e03b6e6
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 45eaf7e..1f1e1d3 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -3864,10 +3864,12 @@ MODULE_SCOPE Tcl_Mutex *TclpNewAllocMutex(void);
# define TclpAlloc(size) ckalloc(size)
# define TclpRealloc(ptr, size) ckrealloc((ptr),(size))
# define TclpFree(size) ckfree(size)
+# define TclAllocMaximize(ptr) UINT_MAX
#else
MODULE_SCOPE char * TclpAlloc(unsigned int size);
MODULE_SCOPE char * TclpRealloc(char * ptr, unsigned int size);
MODULE_SCOPE void TclpFree(char * ptr);
+ MODULE_SCOPE unsigned int TclAllocMaximize(void *ptr);
#endif
#if TCL_ALLOCATOR == aPURIFY