aboutsummaryrefslogtreecommitdiff
path: root/jim.c
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2010-09-10 15:22:26 +1000
committerSteve Bennett <steveb@workware.net.au>2010-10-15 11:02:52 +1000
commit82594fa49fcc6a10cd020dda214688fda215605e (patch)
tree881462a91cf38fc4007878d08b6f5dfa4c8ed953 /jim.c
parentec978d041463c9effdb17018f064df29592f8d40 (diff)
downloadjimtcl-82594fa49fcc6a10cd020dda214688fda215605e.zip
jimtcl-82594fa49fcc6a10cd020dda214688fda215605e.tar.gz
jimtcl-82594fa49fcc6a10cd020dda214688fda215605e.tar.bz2
Reduce excessive stack usage
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim.c')
-rw-r--r--jim.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/jim.c b/jim.c
index 5637e05..ac0599b 100644
--- a/jim.c
+++ b/jim.c
@@ -9057,6 +9057,7 @@ static void JimPrngSeed(Jim_Interp *interp, const unsigned char *seed, int seedL
static void JimPrngInit(Jim_Interp *interp)
{
int i;
+ /* REVISIT: Move off stack */
unsigned int seed[256];
interp->prngState = Jim_Alloc(sizeof(Jim_PrngState));
@@ -9092,6 +9093,7 @@ static void JimRandomBytes(Jim_Interp *interp, void *dest, unsigned int len)
static void JimPrngSeed(Jim_Interp *interp, const unsigned char *seed, int seedLen)
{
int i;
+ /* REVISIT: Move off stack */
unsigned char buf[256];
Jim_PrngState *prng;
@@ -11636,6 +11638,7 @@ static int Jim_DebugCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *ar
}
else if (option == OPT_OBJCOUNT) {
int freeobj = 0, liveobj = 0;
+ /* REVISIT: Move off stack */
char buf[256];
Jim_Obj *objPtr;
@@ -11667,6 +11670,7 @@ static int Jim_DebugCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *ar
objPtr = interp->liveList;
listObjPtr = Jim_NewListObj(interp, NULL, 0);
while (objPtr) {
+ /* REVISIT: Move off stack */
char buf[128];
const char *type = objPtr->typePtr ? objPtr->typePtr->name : "";
@@ -12458,7 +12462,7 @@ static int Jim_TimeCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *arg
{
long i, count = 1;
jim_wide start, elapsed;
- char buf[256];
+ char buf[60];
const char *fmt = "%" JIM_WIDE_MODIFIER " microseconds per iteration";
if (argc < 2) {