diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-11-21 15:19:11 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-11-21 15:19:11 -0200 |
commit | 5142e630bf91e2353f4397e03593ab56b3a07b86 (patch) | |
tree | 1402e556c77f5c45e956ea6cd3192cffaf2e28d1 /lgc.c | |
parent | 010bbd9d9c8c6e7d38062df79e886466de5a835a (diff) | |
download | lua-github-5142e630bf91e2353f4397e03593ab56b3a07b86.tar.gz |
new macro `condhardstacktests' to control hard stack tests
Diffstat (limited to 'lgc.c')
-rw-r--r-- | lgc.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,5 +1,5 @@ /* -** $Id: lgc.c,v 1.160 2002/11/21 14:17:15 roberto Exp roberto $ +** $Id: lgc.c,v 1.161 2002/11/21 15:46:20 roberto Exp roberto $ ** Garbage Collector ** See Copyright Notice in lua.h */ @@ -224,9 +224,11 @@ static void checkstacksizes (lua_State *L, StkId max) { int used = L->ci - L->base_ci; /* number of `ci' in use */ if (4*used < L->size_ci && 2*BASIC_CI_SIZE < L->size_ci) luaD_reallocCI(L, L->size_ci/2); /* still big enough... */ + else condhardstacktests(luaD_reallocCI(L, L->size_ci)); used = max - L->stack; /* part of stack in use */ if (4*used < L->stacksize && 2*(BASIC_STACK_SIZE+EXTRA_STACK) < L->stacksize) luaD_reallocstack(L, L->stacksize/2); /* still big enough... */ + else condhardstacktests(luaD_reallocstack(L, L->stacksize)); } |