lua-users home
lua-l archive

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


> I just got the following assert:
> 
> lua_assert(g->totalbytes >= g->estimate)
> 
> ...on line 630, lgc.c. A bit of Googling found the following reference:
> 
> http://lua-users.org/lists/lua-l/2004-12/msg00248.html
> 
> ...where Roberto suggests that it be commented out. That was six years
> and several updates of Lua ago; I've commented it out, but I'm hoping to
> get a verification that it's still an "optional" assert, and that it's
> not indicating a deeper problem.

That assertion indeed may not be true. (It wrongly assumes that only
the gc can free memory, but table resizing can also do that.)


> I couldn't find the earlier discussion Roberto alluded to; apologies if
> the info is there and I'm just not finding it. I do admit to being
> curious as to why it's still there if it's a harmless condition as well.

I could not find it, too. Maybe that was some private message. Anyway,
we will remove that assert.

-- Roberto