[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: bug of GC "step"
- From: Makoto Hamanaka <naraxx800@...>
- Date: Fri, 04 Jul 2008 12:03:49 +0900
Roberto wrote:
> Doesn't this second change solve both problems? As long as an end-of-cycle
> breaks the loop, infinite loops are avoided. luaC_step already stops
> at end-of-cycle, so I guess all we need is something like this (untested):
>
> - while (g->GCthreshold <= g->totalbytes)
> - luaC_step(L);
> - if (g->gcstate == GCSpause) /* end of cycle? */
> - res = 1; /* signal it */
>
> + while (g->GCthreshold <= g->totalbytes) {
> + luaC_step(L);
> + if (g->gcstate == GCSpause) /* end of cycle? */
> + return 1; /* signal it */
> + }
Yes!
I think this will fix both problems.
I'll test it with my Lua projects, not so many I have though.
Thanks so much to you, and also to Mauro and Irayo.
Regards,
Makoto Hamanaka