[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A generational GC question
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 23 Dec 2020 11:02:53 -0300
> I meant the value pointed to by the up-value . This is the 5.3 code;
>
> /*
> ** barrier for assignments to closed upvalues. Because upvalues are
> ** shared among closures, it is impossible to know the color of all
> ** closures pointing to it. So, we assume that the object being assigned
> ** must be marked.
> */
> void luaC_upvalbarrier_ (lua_State *L, UpVal *uv) {
> global_State *g = G(L);
> GCObject *o = gcvalue(uv->v);
> lua_assert(!upisopen(uv)); /* ensured by macro luaC_upvalbarrier */
> if (keepinvariant(g))
> markobject(g, o);
> }
>
> My question is what age to set 'o' to.
> In the early GC code I quoted, this was set to G_OLD0.
So, G_OLD0. Or there was something wrong with that early code? The
comment explains this choice.
-- Roberto