lua-users home
lua-l archive

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


On Fri, Sep 3, 2010 at 2:39 PM, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
> With the current incremental garbage collector, the collector is moved
> forward by allocations, that is, deltas in 'totalbytes', not by its
> absolute value. (The only effect that the absolute value of 'totalbytes'
> has on the collector speed is to make the collector slower, increasing
> the pause between collection cycles.)
>
> So, to mimic the effect of an external allocation as if it were
> internal, lua_gc(STEP, x) seems to be more than enough.

That's interesting, thank you for the clarification. Maybe it would be
a good idea to add a note about this to the documentation for
lua_newuserdata(), or somewhere in the next version of the manual/PiL.

-Duncan