new way to control stack overflow, controling only total size of the stack

This commit is contained in:
Roberto Ierusalimschy
2009-07-15 14:26:14 -03:00
parent abb85fc059
commit f76f4cb79d
10 changed files with 100 additions and 78 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: llimits.h,v 1.71 2009/06/08 19:35:59 roberto Exp roberto $
** $Id: llimits.h,v 1.72 2009/07/01 16:14:15 roberto Exp roberto $
** Limits, basic types, and some other `installation-dependent' definitions
** See Copyright Notice in lua.h
*/
@@ -122,8 +122,8 @@ typedef lu_int32 Instruction;
#ifndef HARDSTACKTESTS
#define condmovestack(L) ((void)0)
#else
#define condmovestack(L) /* realloc stack keeping its size */ \
luaD_reallocstack((L), (L)->stacksize - EXTRA_STACK - 1)
/* realloc stack keeping its size */
#define condmovestack(L) luaD_reallocstack((L), (L)->stacksize)
#endif
#endif