[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Meaning of lua_assert(g->totalbytes >= g->estimate)
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 18 Mar 2011 14:34:43 -0300
> 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:
> ...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.