[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Garbage collection causes stack overflow
- From: Fotis Panagiotopoulos <f.j.panag@...>
- Date: Thu, 11 Apr 2019 15:31:44 +0300
Unfortunatelly not in my platform.
The stack overflow is detected by filling the stack with a known pattern, and then checking whether there are any data written to it. Thus the overflow is detected at a later time, not the moment that it is happening.
Maybe if I had more RAM (like a normal desktop computer), the problem wouldn't appear. But is this the way the GC is working? Does it use any kind of recursion? Or any large stack buffers?
> To my surprise the program failed in another way. As the memory usage is
> increased, Lua calls the garbage collector to free up some memory. Each
> time the garbage collector is running, it is using more and more stack,
> leading to stack overflow long before the heap is exhausted. It seems that
> no matter how much I increase the stack size, the garbage collector will
> eat it all very soon.
Don't you have a stack trace?