mirror of
https://github.com/lua/lua.git
synced 2025-01-28 06:03:00 +08:00
comments were wrong (not updated about several changes)
This commit is contained in:
parent
eb45f3a9b6
commit
88ef06f4f3
12
lgc.c
12
lgc.c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lgc.c,v 2.199 2014/10/30 18:53:28 roberto Exp roberto $
|
||||
** $Id: lgc.c,v 2.200 2014/11/02 19:19:04 roberto Exp roberto $
|
||||
** Garbage Collector
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -705,10 +705,10 @@ static GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count);
|
||||
|
||||
/*
|
||||
** sweep at most 'count' elements from a list of GCObjects erasing dead
|
||||
** objects, where a dead (not alive) object is one marked with the "old"
|
||||
** (non current) white and not fixed; change all non-dead objects back
|
||||
** to white, preparing for next collection cycle.
|
||||
** When object is a thread, sweep its list of open upvalues too.
|
||||
** objects, where a dead object is one marked with the old (non current)
|
||||
** white; change all non-dead objects back to white, preparing for next
|
||||
** collection cycle. Return where to continue the traversal or NULL if
|
||||
** list is finished.
|
||||
*/
|
||||
static GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count) {
|
||||
global_State *g = G(L);
|
||||
@ -721,7 +721,7 @@ static GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count) {
|
||||
*p = curr->next; /* remove 'curr' from list */
|
||||
freeobj(L, curr); /* erase 'curr' */
|
||||
}
|
||||
else { /* update marks */
|
||||
else { /* change mark to 'white' */
|
||||
curr->marked = cast_byte((marked & maskcolors) | white);
|
||||
p = &curr->next; /* go to next element */
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user