summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authormig <mig>2011-03-18 16:16:09 (GMT)
committermig <mig>2011-03-18 16:16:09 (GMT)
commit8fa8bd69eb29f77d7d92d3f3c79385ee28f87ccc (patch)
tree3b4b825395c09a31cf53e8e545e667b8b194c28e /generic/tclInt.h
parenteed4991d081bb530cc04accd03144a4d815d2b3a (diff)
downloadtcl-8fa8bd69eb29f77d7d92d3f3c79385ee28f87ccc.zip
tcl-8fa8bd69eb29f77d7d92d3f3c79385ee28f87ccc.tar.gz
tcl-8fa8bd69eb29f77d7d92d3f3c79385ee28f87ccc.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.
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