lua-users home
lua-l archive

RE: Odd GC recursion

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


> This is a bug in Lua. It cannot call GCTM before updating GCthreshold.
> A quick fix is to increment GCthreshold before calling GCTM. 
> Something like this (in lgc.c):
> 
> case GCSfinalize: {
> if (g->tmudata) {
> + g->GCthreshold = g->totalbytes + GCFINALIZECOST; /* 
> untested! 
> + */
> GCTM(L);
> return GCFINALIZECOST;
> }
> 
> -- Roberto
 Thanks Roberto. I tested this little fix and it works perfectly.
 Tom Spilman
 Co-owner | Programmer
 www.sickheadgames.com

AltStyle によって変換されたページ (->オリジナル) /