summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authormig <mig>2011-03-18 19:18:36 (GMT)
committermig <mig>2011-03-18 19:18:36 (GMT)
commit5d469a215fdc4fdb33b70cbd29969293680963e5 (patch)
tree576a3414f28d4f8dd8262572a8d0e0e64ed73b89 /generic
parent0c6e7852c9f3570adf39a45c72ad1e0b9850b470 (diff)
downloadtcl-5d469a215fdc4fdb33b70cbd29969293680963e5.zip
tcl-5d469a215fdc4fdb33b70cbd29969293680963e5.tar.gz
tcl-5d469a215fdc4fdb33b70cbd29969293680963e5.tar.bz2
let TclAllocMaximize maintain zippys stats
Diffstat (limited to 'generic')
-rw-r--r--generic/tclAlloc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c
index ff04c2b..f5fe3ee 100644
--- a/generic/tclAlloc.c
+++ b/generic/tclAlloc.c
@@ -877,7 +877,14 @@ TclpRealloc(
blockPtr->reqSize = newSize;
#if RCHECK
((unsigned char *)(ptr))[newSize] = MAGIC;
-#endif
+#endif
+#ifdef ZIPPY_STATS
+ {
+ Cache *cachePtr;
+ GETCACHE(cachePtr);
+ cachePtr->buckets[bucket].totalAssigned += (newSize - oldSize);
+ }
+#endif
return newSize;
}