[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Stack Space Question - lua_open and lua_stackspace
- From: Chris.Hoskovec@...
- Date: Fri, 17 Aug 2001 09:01:23 -0500
I had a few questions dealing with stack space that I couldn't find any
answers for in the docs or in any of the previous posts. The current
environment it: Lua 4.0, AIX 4.3 and the main app is written in C. The
application (it is a demon process) manages multiple copies of the LUA
environment at the same time. The app reads an IPC queue and based on the
information found, will execute a script in one of the copies of LUA it has
running. My questions are.
1. When I do the lua_open, I pass across a parameter of 1024. However,
when I do a lua_stackspace, I get 1043. I wondered why. BTW, the
lua_stackspace is called after I have done a lua_dofile.
2. Each time I have LUA process a script, I pass values into LUA, call the
LUA function (using lua_call), then do a lua_pop to get the return value.
Each LUA function I call should always return one value. After each call
to the LUA function, I call lua_stackspace to make sure I havn't messed
anything up. My question on this was should that stack size ever change?
If I make my calls to LUA and I get a stack size of anything other than the
1043 (the original amount), does that mean that there may be an issue
within the environment and I should close it/reload it?