lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>I need to be able to determine in a predictable way if a program are
>'too big', is it possible to do that with Lua by counting how many
>bytecodes a program have executed and stop it after a certain number?

In Lua 5.0, yes: you can set a count hook for the max number of instructions
allowed and call error in it to stop the program.
--lhf