[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: How dose GC process upvalue
- From: YuanLin <yuanlin2008@...>
- Date: Tue, 26 Mar 2013 20:30:14 +0800
I'm studying the code about gc in lua 5.2.
Here is the code in lgc.c:
268 case LUA_TUPVAL: {
269 UpVal *uv = gco2uv(o);
270 markvalue(g, uv->v);
271 if (uv->v != &uv->u.value) /* open? */
272 return; /* open upvalues remain gray */
273 size = sizeof(UpVal);
274 break;
275 }
Why "open upvalues remain gray", not to black?
How dose GC process upvalue?
Thanks.