lua-users home
lua-l archive

[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