diff options
author | mig <mig> | 2011-03-21 11:42:06 (GMT) |
---|---|---|
committer | mig <mig> | 2011-03-21 11:42:06 (GMT) |
commit | 060fd2cde91e18a0c1277d336f092cb708b48659 (patch) | |
tree | 4d1fa69e4ed007ebd63c09c31a34e368247ad3ad /generic | |
parent | a30d6f688d56e1735e98efee26fe094f0453cf6a (diff) | |
download | tcl-060fd2cde91e18a0c1277d336f092cb708b48659.zip tcl-060fd2cde91e18a0c1277d336f092cb708b48659.tar.gz tcl-060fd2cde91e18a0c1277d336f092cb708b48659.tar.bz2 |
small opts
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclAlloc.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c index 9c0ab02..e641e97 100644 --- a/generic/tclAlloc.c +++ b/generic/tclAlloc.c @@ -628,7 +628,6 @@ TclpAlloc( * allocating more blocks if necessary. */ - blockPtr = NULL; size = reqSize + OFFSET; #if RCHECK size++; @@ -642,6 +641,7 @@ TclpAlloc( } #endif } else { + blockPtr = NULL; bucket = 0; while (bucketInfo[bucket].blockSize < size) { bucket++; @@ -655,9 +655,9 @@ TclpAlloc( cachePtr->buckets[bucket].totalAssigned += reqSize; #endif } - } - if (blockPtr == NULL) { - return NULL; + if (blockPtr == NULL) { + return NULL; + } } return Block2Ptr(blockPtr, bucket, reqSize); } @@ -694,7 +694,9 @@ TclpFree( return free((char *) ptr); } +#ifdef ZIPPY_STATS GETCACHE(cachePtr); +#endif /* * Get the block back from the user pointer and call system free directly @@ -712,6 +714,10 @@ TclpFree( return; } +#ifndef ZIPPY_STATS + GETCACHE(cachePtr); +#endif + #ifdef ZIPPY_STATS cachePtr->buckets[bucket].totalAssigned -= blockPtr->reqSize; #endif |