|
On 11-Apr-19 19:21, Fotis Panagiotopoulos wrote:
> I am pretty confident that the issue is caused by the GC. I measure the stack exactly before
> and after lua_pcall(), and indeed this is where the stack is used. I also placed some prints
> and I see that stack usage increases only when GC is running.
>
> Note that stack is used progressively. On every GC call, more and more
> is requested till the exhaustion. On the first
> calls the usage is pretty minimal.
Sparse (and probably not useful) thoughts:
- What allocator are you using? Does it fully support realloc?
- You could try tracing allocations by inserting a tracer between Lua
allocation calls and the actual allocator, also doing a stack check
(and possibly other checks) before and after each call, to get a few
more clues about what is happening.
--
Enrico