lua-users home
lua-l archive

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


On Fri, Mar 9, 2012 at 10:41 AM, Nelson Page <npage@factset.com> wrote:
> I have some large lua files.  I notice I could use lauxlib.h and call
> luaL_loadstring, but that looks like it will use about as much memory as the
> size of the lua file, which is undesirable.  I don’t need the output, I only

Try the underlying lua_load(), it allows you to provide the file in
small chunks:

http://www.lua.org/manual/5.1/manual.html#lua_load

The auxlib luaL_ function should be a wrapper around this.

Cheers,
Sam