diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-12-20 11:58:15 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-12-20 11:58:15 -0200 |
commit | 88ef06f4f3074d54743e178aaf61fa464b2065b4 (patch) | |
tree | 542f7ae58b7415828a9e0ea3e5780243cc9d7d97 | |
parent | eb45f3a9b6cb1faa18bd552ae97e9679a4936361 (diff) | |
download | lua-88ef06f4f3074d54743e178aaf61fa464b2065b4.tar.gz lua-88ef06f4f3074d54743e178aaf61fa464b2065b4.tar.bz2 lua-88ef06f4f3074d54743e178aaf61fa464b2065b4.zip |
comments were wrong (not updated about several changes)
-rw-r--r-- | lgc.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lgc.c,v 2.199 2014/10/30 18:53:28 roberto Exp roberto $ | 2 | ** $Id: lgc.c,v 2.200 2014/11/02 19:19:04 roberto Exp roberto $ |
3 | ** Garbage Collector | 3 | ** Garbage Collector |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -705,10 +705,10 @@ static GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count); | |||
705 | 705 | ||
706 | /* | 706 | /* |
707 | ** sweep at most 'count' elements from a list of GCObjects erasing dead | 707 | ** sweep at most 'count' elements from a list of GCObjects erasing dead |
708 | ** objects, where a dead (not alive) object is one marked with the "old" | 708 | ** objects, where a dead object is one marked with the old (non current) |
709 | ** (non current) white and not fixed; change all non-dead objects back | 709 | ** white; change all non-dead objects back to white, preparing for next |
710 | ** to white, preparing for next collection cycle. | 710 | ** collection cycle. Return where to continue the traversal or NULL if |
711 | ** When object is a thread, sweep its list of open upvalues too. | 711 | ** list is finished. |
712 | */ | 712 | */ |
713 | static GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count) { | 713 | static GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count) { |
714 | global_State *g = G(L); | 714 | global_State *g = G(L); |
@@ -721,7 +721,7 @@ static GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count) { | |||
721 | *p = curr->next; /* remove 'curr' from list */ | 721 | *p = curr->next; /* remove 'curr' from list */ |
722 | freeobj(L, curr); /* erase 'curr' */ | 722 | freeobj(L, curr); /* erase 'curr' */ |
723 | } | 723 | } |
724 | else { /* update marks */ | 724 | else { /* change mark to 'white' */ |
725 | curr->marked = cast_byte((marked & maskcolors) | white); | 725 | curr->marked = cast_byte((marked & maskcolors) | white); |
726 | p = &curr->next; /* go to next element */ | 726 | p = &curr->next; /* go to next element */ |
727 | } | 727 | } |