[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: stack/memory problem
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 14 Dec 2011 11:03:17 -0200
> If I don't do anything (don't pop values, don't use checkstack and don't
> use lua_settop(L, 0)) I run out of memory, no surprise there.
There is no need to lua_settop(L, 0) if you're in a C function called by Lua.
There is, however, a need to call lua_checkstack/luaL_checkstack if you
use more than 20 stack entries.
> How is proper stack handling supposed to be done?
Perhaps rebuilding Lua with LUA_USE_APICHECK on will help pinpoint the problem.