LuaJit increases stack / heap size

I keep getting a memory error in LuaJit. How to increase stack or heap size?

thanks

+3
source share
1 answer

I myself have not used LuaJIT, except with toy examples. But since no one has yet given any answers ...

From the documentation section, LuaJIT depends on Coco extensions to the standard coroutine library. One of the changes Coco made is that the functions that create the new coroutine now use an optional argument to determine the size of the stack.

Quoting Coco docs:

coro = coroutine.create(f [, cstacksize])
func = coroutine.wrap(f [, cstacksize])

cstacksize C :

  • , cstacksize nil .
  • C, cstacksize - -1.
  • (.. 1 ).

coroutine.cstacksize([newdefault]), C, API C.

, LuaJIT- luaconf.h . -, . Windows , MSVC LINK.EXE STACKSIZE .DEF .

+3

Source: https://habr.com/ru/post/1716437/


All Articles