summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rwxr-xr-xgeneric/tclThreadAlloc.c18
2 files changed, 14 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 9716b22..e4ec9c9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-20 Donal K. Fellows <donal.k.fellows@man.ac.uk>
+
+ * generic/tclThreadAlloc.c (Tcl_GetMemoryInfo): Format values as longs
+ and not ints, so they are less likely to wrap on 64-bit machines.
+
2005-12-19 Donal K. Fellows <donal.k.fellows@man.ac.uk>
* doc/Tcl.n: Clarify what is going on in variable substitution
diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c
index 6b02906..69f0e9f 100755
--- a/generic/tclThreadAlloc.c
+++ b/generic/tclThreadAlloc.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclThreadAlloc.c,v 1.4.2.6 2005/04/07 11:27:17 vasiljevic Exp $
+ * RCS: @(#) $Id: tclThreadAlloc.c,v 1.4.2.7 2005/12/20 22:16:34 dkf Exp $
*/
#include "tclInt.h"
@@ -90,12 +90,12 @@ typedef struct Block {
typedef struct Bucket {
Block *firstPtr;
- int nfree;
- int nget;
- int nput;
- int nwait;
- int nlock;
- int nrequest;
+ long nfree;
+ long nget;
+ long nput;
+ long nwait;
+ long nlock;
+ long nrequest;
} Bucket;
/*
@@ -637,8 +637,8 @@ Tcl_GetMemoryInfo(Tcl_DString *dsPtr)
Tcl_DStringAppendElement(dsPtr, buf);
}
for (n = 0; n < NBUCKETS; ++n) {
- sprintf(buf, "%d %d %d %d %d %d %d",
- (int) binfo[n].blocksize,
+ sprintf(buf, "%lu %ld %ld %ld %ld %ld %ld",
+ (unsigned long) binfo[n].blocksize,
cachePtr->buckets[n].nfree,
cachePtr->buckets[n].nget,
cachePtr->buckets[n].nput,